Re: [R] All possible combinations of functions within a function

2009-11-10 Thread Michael L. Treglia
Thank you Baptiste and Jim- I look forward to trying these ideas out when I have a chance. Mike baptiste auguie wrote: Hi, >From what I understand of your code, you might find the following construct useful, funs <- c("mean", "sum", "sd", "diff") x <- 1:10 lapply(funs, do.call, args=list(x))

Re: [R] All possible combinations of functions within a function

2009-11-10 Thread baptiste auguie
Hi, >From what I understand of your code, you might find the following construct useful, funs <- c("mean", "sum", "sd", "diff") x <- 1:10 lapply(funs, do.call, args=list(x)) and then working with lists rather than naming every object individually. You might find mapply useful too when you have t

Re: [R] All possible combinations of functions within a function

2009-11-10 Thread jim holtman
Here is a hint of how you might want to do the first part. You might want to study the 'lappy' function vegList <- lapply(c('bray', ..., 'binomial'), function(.method){ vegdist(x, method=.method) }) clustList <- lapply(vegList, function(.dist){ lapply(c('average', ..., 'centroid'), funct