Hello everyone,

How does one pass multiple arguments of a user defined function to that
function when called within sapply()?

I have the following:

> myna<-function(x,miss.val) {x[x %in% miss.val]<-NA;x}
> mydataNA3<-sapply(mydataNA,c(x=myna,miss.val=c(9,99)))
Error in match.fun(FUN) :
  'c(x = myna, miss.val = c(9, 99))' is not a function, character or symbol
> mydataNA3


Thanks!

Dan

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to