Re: [R] convert apply to lappy

2011-10-10 Thread Alaios
Thanks alot for the tip. Worked :) From: Joshua Wiley Cc: "R-help@r-project.org" Sent: Sunday, October 9, 2011 6:32 PM Subject: Re: [R] convert apply to lappy Hi Alex, If "data" is a matrix, probably the easiest option would be: tips &

Re: [R] convert apply to lappy

2011-10-09 Thread Joshua Wiley
Hi Alex, If "data" is a matrix, probably the easiest option would be: tips <- as.data.frame(data) mclapply(tips, foo) By the way, I would recommend not using 'data' (which is also a function) as the name of the object storing your data. If your data set has many columns and performance is an i

[R] convert apply to lappy

2011-10-09 Thread Alaios
Dear all I want to convert a apply to lapply. The reason for that is that there is a function mclappy that uses exact the same format as the lapply function. My code looks like that mean_power_per_tip <- function(data) {     return((apply(data[,],2,MeanTip))); } where data is a [m,n] matrix