Hello,
I would like to apply the EF function (a goodness of fit test between
predicted (ts2) and observed (Tw) values in the qualV package) to
each of the Sites in my data frame. However, when I try the following
script, R gives an error message that lists unused arguments, which
include the Tw and ts2 that are explicitly in the function:
nsc = by(tsdem16, tsdem16['Site'], function(x) EF(Tw, ts2, data = x))
Error in EF(Tw, ts1, data = x) :
unused argument(s) (data = list(ts2 = c(11.9967554700039, ...
I tried a for loop, but it didn't perform the function on each Site,
rather it performed one calculation for the entire data set.
Are there any suggestions to improving my script?
Thanks,
Ingrid
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.