[R] levelplot blocks size
Greg.Snow at imail.org
Tue Dec 28 21:31:32 CET 2010
Here is a basic example:
tmp.df <- expand.grid( x= 1:100, y=1:100 )
tmp.df$z <- with(tmp.df, x+2*y)
levelplot( z ~ x + y, data=tmp.df )
tx2 <- with(tmp.df, cut(x, seq(0.5, 100.5, 10) ) )
ty2 <- with(tmp.df, cut(y, seq(0.5, 100.5, 20) ) )
tmp.df2 <- aggregate(tmp.df, list( tx2, ty2 ), mean )
levelplot( z ~ x + y, data=tmp.df2 )
Hope this helps,
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at imail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of jonathan
> Sent: Monday, December 27, 2010 7:00 PM
> To: r-help at r-project.org
> Subject: Re: [R] levelplot blocks size
> Thanks for your help.
> Might you be able to explain in a little more detail how to use those
> functions to solve this specific problem?
> I'm happy to put in the work myself and have looked up those functions
> am new to R and still a little unsure about how I would go about using
> functions to solve my problem.
> View this message in context: http://r.789695.n4.nabble.com/levelplot-
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help