search for: sol4

Displaying 1 result from an estimated 1 matches for "sol4".

Did you mean: sol
2012 Sep 02
0
most efficient plyr solution
...ans3 <- matrix(unlist(res3),ncol=4) } s3 <- sol3() ### solution 4 using plyr::maply # difficulty finding equivalent code # benefit could be: no input transform, no output transform, parallelization, and progress update library(plyr) library(abind) library(doMC) registerDoMC(cores=4) sol4 <- function() { ans4 <- maply( #.data = abind(i=Ax,j=Ay,k=Bx,l=By,along=0), #.data = abind(Ax,Ay,Bx,By,along=3), #.data = data.frame(i=Ax, j=Ay, k=Bx, l=By), #.data = cbind(i=as.vector(Ax), j=as.vector(Ay), k=as.vector(Bx), l=as.vector(By)), #.data = list(i=Ax, j=Ay, k=Bx, l=...