search for: lcapplyversion

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

2011 Nov 11
0
mc.cores and computer settings on osx and linux
...ofcols, "columns, but has", ncol(mc.rv[[i]]), "columns instead.") } } } add.by.names <- function( mc.rv ) { for (i in 1:length(mc.rv)) if (!is.null(mc.rv[[i]])) row.names(mc.rv[[i]]) <- rep( names(mc.rv)[i], nrow(mc.rv[[i]]) ) mc.rv } .mc.by <- function(lcapplyversion, data, INDICES, FUN, ...) { si <- split(1:nrow(data), INDICES) ## input = set of row indexes ; output = one row in a matrix or data frame, that can be stacked up FUN.ON.ROWS <- function(.index, ...) { rv <- FUN(data[.index,], ...); if (is.null(rv)) rv else if (is.vector(rv)) matrix(...