[R] summarized data set - how to use an "occurs" field
    mloxton 
    mhloxton at gmail.com
       
    Fri Jul 22 23:11:39 CEST 2011
    
    
  
David, thanks, I think that should work perfectly
Much obliged
>
>  > dfrm <- expand.grid(A=1:3, B=1:3)
>  > dfrm$counts <- 1:9
>  > xtabs(counts~A, data=dfrm)
> A
>   1  2  3
> 12 15 18
>
>  >barplot(xtabs(counts~A, data=dfrm), xlab="Counts by A level")
>
> --
>
> David Winsemius, MD
> West Hartford, CT
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
    
    
More information about the R-help
mailing list