R plot frequency distribution

后端 未结 3 1074
无人及你
无人及你 2021-01-21 16:24

How can I plot a frequency distribution in R? I don\'t want to bin values. I just want to plot frequency for each value. The hist function insists on binning values

相关标签:
3条回答
  • 2021-01-21 17:09
    table(sample(1:10,20,replace=T))
    
    0 讨论(0)
  • 2021-01-21 17:21

    You could plot the table of your data:

    xx<-sample(1:10,100,replace=TRUE)
    plot(table(xx))
    

    a histogram

    0 讨论(0)
  • 2021-01-21 17:23

    have you tried s.distri {ade4}? http://pbil.univ-lyon1.fr/ade4/ade4-html/s.distri.html

     library(ade4)
      xy <- cbind.data.frame(x = runif(200,-1,1), y = runif(200,-1,1))
      distri <- data.frame(w1 = rpois(200, xy$x * (xy$x > 0)))
      s.value(xy, distri$w1, cpoi = 1)
    
    0 讨论(0)
提交回复
热议问题