Create a histogram for weighted values

前端 未结 3 566
醉酒成梦
醉酒成梦 2020-12-06 16:33

If I have a vector (e.g., v<-runif(1000)), I can plot its histogram (which will look, more or less, as a horizontal line because v is a sample f

3条回答
  •  天命终不由人
    2020-12-06 17:06

    An alternative from the weights package is wtd.hist()

    w<-seq(1,1000) v<-sort(runif(1000)) wtd.hist(x=v,weight=w)

提交回复
热议问题