Map a function along rows of a matrix or data.frame

map_rows_parallel(
  mat,
  f,
  ...,
  parallel = T,
  ncores = getCores(),
  row_thresh = 20,
  collapse = "rbind"
)

Arguments

mat

matrix or data.frame whose rows are passed as data to f

f

function to map along rows

...

parameters passed to function

parallel

T/F, whether to operate in parallel or in sequence

ncores

number of cores to use

row_thresh

required number of rows to use parallel processing

collapse

function to use when collapsing list of objects

Details

only works if the function's dependencies are completely contained in "quantspace" package