[R] Subset in cast: compact form?
Agustin Lobo
aloboaleu at gmail.com
Thu Jun 12 21:27:49 CEST 2008
Hi!
How can I subset several variables in cast?
For example, I can do it for one, (ie, ph):
cast(am, organismo +arriba ~ variable,subset=variable=="ph",mean,na.rm=T)
For selecting ph, temperature and Ba I'm using:
cast(am, organismo +arriba ~ variable,subset=variable=="ph"
variable=="temperature"| variable== "Ba",mean,na.rm=T)
Is there a more compact form? something like select=c(ph, temperature, Ba)
Thanks
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster
More information about the R-help
mailing list