[R] use ggplot in a function to which a column name is given
jiho
jo.irisson at gmail.com
Thu Dec 13 10:52:42 CET 2007
Follow up.
On 2007-December-13 , at 10:45 , jiho wrote:
> foo1 <- function(uv="u")
> {
> # solution 1: do not use the data argument at all
> # (forces the use of qplot, could be more elegant)
> B = A[A$y<=5,]
> qplot(B$x, B$y, fill=B[[uv]], geom="tile")
> }
---> actually this does not even work currently:
Error in eval(expr, envir, enclos) : object "B" not found
Which only leaves the most inelegant solution: 2
JiHO
---
http://jo.irisson.free.fr/
More information about the R-help
mailing list