[R] dataframe: visualization as tiles(?)
Jason Turner
jasont at indigoindustrial.co.nz
Wed Apr 14 08:43:25 CEST 2004
>
> Dear R users,
>
> I remember seeing somewhere a method of visualizing a set of
> observations on two variables x and y in the following way
Is this what you want?
> ## fake data
> zz <- data.frame(x=sample(0:1,20,rep=T),y=sample((-1:1),20,rep=T))
> zz
> ## tabulate it
> zz.tab <- data.frame(table(zz))
> zz.tab
> library(lattice)
> barchart(y ~ Freq | x, data=zz.tab)
Cheers
Jason
More information about the R-help
mailing list