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 unless I specify bins manually (really tedious, because I don't know the values in advance).
            Asked
            
        
        
            Active
            
        
            Viewed 9,937 times
        
    2
            
            
         
    
    
        chl
        
- 27,771
- 5
- 51
- 71
 
    
    
        Colonel Panic
        
- 132,665
- 89
- 401
- 465
3 Answers
7
            You could plot the table of your data:
xx<-sample(1:10,100,replace=TRUE)
plot(table(xx))

 
    
    
        BenBarnes
        
- 19,114
- 6
- 56
- 74
1
            
            
        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)
 
    
    
        cianius
        
- 2,272
- 6
- 28
- 41
- 
                    This wasn't what I meant, but it looks fun. – Colonel Panic Jul 12 '12 at 15:09
