[R] help with ggplot2

Ronaldo Reis Júnior chrysopix at gmail.com
Fri Jan 29 12:10:29 CET 2016


Hi,

I try to put 4 different curves to 4 different grids using ggplot2 
package. But, I dont know how.

I have something like this:

A1B1 <- function(x) {exp(4.319735-0.098362*x)}
A1B2 <- function(x) {exp(4.350256-0.098362*x)}
A2B1 <- function(x) {exp(4.920225-0.238536*x)}
A2B2 <- function(x) {exp(5.257911-0.238536*x)}
ggplot(mean, aes(x=xvalue, y=yvalue)) +
   geom_errorbar(aes(ymin=yvalue-SE, ymax=yvalue+SE), width=.1)+
   geom_point()+
   facet_grid(A~B)

Ok, the mean+-SE graphs work. But how I can made to put each equation on 
correct grid? I try to use the stat_function(fun = A1B1), but it put the 
equation on all grids, not only on A1B1 grid.

Any idea?

Thanks
Ronaldo


-- 
1

> Prof. Ronaldo Reis Júnior
|  .''`. UNIMONTES/DBG/Lab. Ecologia Comportamental e Computacional
| : :'  : Campus Universitário Prof. Darcy Ribeiro, Vila Mauricéia
| `. `'` CP: 126, CEP: 39401-089, Montes Claros - MG - Brasil
|   `- Fone: (38) 3229-8192 | ronaldo.reis em unimontes.br
| http://www.ppgcb.unimontes.br/lecc | LinuxUser#: 205366


	[[alternative HTML version deleted]]



More information about the R-help mailing list