[R] Plot table of counts

Michael Friendly friendly at yorku.ca
Sat Oct 18 22:36:41 CEST 2008


What is the *question* you want to answer from this table of counts?
If it is just to see the density at the combinations of mass and time,
an image() plot might work, and NAs in the table for 0s will give empty
cells.
If you want to see whether there is an association between mass and 
time, or how the distributions for different masses change over time,
mosaic() from the vcd package is worth exploring.

-michael

pofigster at gmail.com wrote:
> I have a data set which is comprised of counts, that is, the number of times a mass spectrometer measured a particular mass at a particular time (the rows and columns of the table).  Is there a way to make a plot so that it draws a square at the mass/time spot on the graphic if there is a count and leave it empty if it's empty?
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list