Hi All,
I'm still pretty new to using R - and I was hoping I might be able to get
some advice as to how to use 'apply' or a similar function instead of using
nested for loops.
Right now I have a script which uses nested for loops similar to this:
i <- 1
for(a in Alpha) { for (b in Beta) { for (c in Gamma) { for (d in Delta) {
for (e in Epsilon)
{
Output[i] <- MyFunction(X, Y, a, b, c, d, e)
i <- i+1
}}}}}
Where Output[i] is a data frame, X and Y are data frames, and Alpha, Beta,
Gamma, Delta, and Epsilon are all lists, some of which are numeric, some
logical (TRUE/FALSE).
Any advice on how to implement some sort of solution that might be quicker
than these nested 'for' loops would be greatly appreciated.
Thanks!
[[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.