Re: [R] ggplot2: proper use of facet_grid inside a function

2009-10-05 Thread ONKELINX, Thierry
-project.org] Namens Bryan Hanson Verzonden: vrijdag 2 oktober 2009 17:21 Aan: R Help Onderwerp: [R] ggplot2: proper use of facet_grid inside a function Hello Again R Folk: I have found items about this in the archives, but I'm still not getting it right. I want to use ggplot2 with facet_grid

Re: [R] ggplot2: proper use of facet_grid inside a function

2009-10-05 Thread Bryan Hanson
: [R] ggplot2: proper use of facet_grid inside a function Hello Again R Folk: I have found items about this in the archives, but I'm still not getting it right. I want to use ggplot2 with facet_grid inside a function with user specified variables, for instance: p - ggplot(data

Re: [R] ggplot2: proper use of facet_grid inside a function

2009-10-05 Thread baptiste auguie
: [R] ggplot2: proper use of facet_grid inside a function Hello Again R Folk: I have found items about this in the archives, but I'm still not getting it right.  I want to use ggplot2 with facet_grid inside a function with user specified variables, for instance:     p - ggplot(data

Re: [R] ggplot2: proper use of facet_grid inside a function

2009-10-05 Thread hadley wickham
Whether or not what follows is to be recommended I don't know, but it seems to work, p - ggplot(diamonds, aes(carat, ..density..)) +  geom_histogram(binwidth = 0.2) x = quote(cut) facets = facet_grid(as.formula(bquote(.~.(x p + facets That's what I'd recommend. You can also just do

Re: [R] ggplot2: proper use of facet_grid inside a function

2009-10-05 Thread baptiste auguie
Now why do I always come up with a twisted bquote() where a simple paste() would do! Thanks, baptiste 2009/10/5 hadley wickham h.wick...@gmail.com: Whether or not what follows is to be recommended I don't know, but it seems to work, p - ggplot(diamonds, aes(carat, ..density..)) +  

[R] ggplot2: proper use of facet_grid inside a function

2009-10-02 Thread Bryan Hanson
Hello Again R Folk: I have found items about this in the archives, but I’m still not getting it right. I want to use ggplot2 with facet_grid inside a function with user specified variables, for instance: p - ggplot(data, aes_string(x = fac1, y = res)) + facet_grid(. ~ fac2) Where data,