[R] sub functions

Ulrich Leopold uleopold at science.uva.nl
Mon May 27 17:36:14 CEST 2002

Dear list,

how can I write the following two lines in one function:

 > Pox2 <- ave(lsk0t50$Pox2, lsk0t50$ProfN, Fun=is.na(lsk0t50$Pox2)) 
          > Pox2 <- data.frame(Pox2)

The following does not work:

 > Pox2 <- data.frame(Pox2 <- ave(lsk0t50$Pox2, lsk0t50$ProfN, 
 > names(Pox2)
[1] "Pox2....ave.lsk0t50.Pox2..lsk0t50.ProfN..Fun...is.na.lsk0t50.Pox2.."

Regards, Ulrich


Ulrich Leopold MSc.

Department of Physical Geography
Institute for Biodiversity and Ecosystem Dynamics
Faculty of Science
University of Amsterdam
Nieuwe Achtergracht 166
NL-1018WV Amsterdam

Phone: +31-(0)20-525-7456 (7451 Secretary)
Fax:   +31-(0)20-525-7431
Email: uleopold at science.uva.nl

Check us also out at:
Netherlands Centre for Geo-ecological Research

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list