Re: [R] mapply to lapply

2011-04-18 Thread Andreas Borg
owInd,3],e=cells[rowInd,5]))) Error in paste("f", i, j, "(a,b,c,d)", sep = "") : argument "i" is missing, with no default What do you think I should try out now? Vielen Dank Alex --- On Mon, 4/18/11, Andreas Borg wrote: From: Andreas Borg Subj

Re: [R] mapply to lapply

2011-04-18 Thread Alaios
Thanks you very much. You made it work! Cheers --- On Mon, 4/18/11, Kenn Konstabel wrote: > From: Kenn Konstabel > Subject: Re: [R] mapply to lapply > To: "Alaios" > Cc: R-help@r-project.org > Date: Monday, April 18, 2011, 1:06 PM > On Mon, Apr 18, 2011 at 2:10 PM,

Re: [R] mapply to lapply

2011-04-18 Thread Kenn Konstabel
ep = "") : >  argument "i" is missing, with no default > > > What do you think I should try out now? > > Vielen Dank > Alex > > --- On Mon, 4/18/11, Andreas Borg wrote: > >> From: Andreas Borg >> Subject: Re: [R] mapply to lapply >> To

Re: [R] mapply to lapply

2011-04-18 Thread Alaios
rgument "i" is missing, with no default What do you think I should try out now? Vielen Dank Alex --- On Mon, 4/18/11, Andreas Borg wrote: > From: Andreas Borg > Subject: Re: [R] mapply to lapply > To: "Alaios" > Cc: R-help@r-project.org > Date: Monday, Apr

Re: [R] mapply to lapply

2011-04-18 Thread Andreas Borg
My solution would be to use an index variable that goes from 1 to the number of rows that are to be processed, along with a helper function which calls Fwithcellvalue with the suitable arguments: F2[i+1,j+1]<-sum(lapply(1:nrow(cells), function(rowInd) Fwithcellvalue(i=i,j=j,a=cells[rowInd,2],b

[R] mapply to lapply

2011-04-18 Thread Alaios
Dear all, I would like to ask your help concerning converting a mapply function to lapply. The reason is that I would like to use mclapply which requires lapply syntax. The command I would like to convert is: F2[i+1,j+1]<-sum(mapply(Fwithcellvalue,i=i,j=j,a=cells[,2],b=cells[,4],c=cells[,1],d=c