It is (at least for me) really unclear what the problem is, or how
it's related to mclapply.
You say
this works fine, except that what I want to get NA's in the return
positions that were not recalculated. then, I can write
newdata$y - ifelse ( is.na(olddata$y), mc.byselectrows( olddata,
I wasn't thinking straight.
old.data= 11:20
recalc.please= (old.data%%2==0)
old.data[recalc.please]
[1] 12 14 16 18 20
new.data[recalc.please]= old.data[recalc.please]^2
Error in new.data[recalc.please] = old.data[recalc.please]^2 :
object 'new.data' not found
# this is where I had given
Dear R wizards---
I have a wrapper on mclapply() that makes it a little easier for me to
do multiprocessing. (Posting this may make life easier for other
googlers.) I pass a data frame, a vector that tells me what rows
should be recomputed, and the function; and I get back a vector or
matrix of
3 matches
Mail list logo