prepare_sequential: Sequentially prepare data for sandwich smooth

View source: R/prepare_sequential.R

prepare_sequentialR Documentation

Sequentially prepare data for sandwich smooth

Description

Sequentially prepare each observation for smoothing. It is assumed that each observation resides in its own file and that do.call(import_fun, list(import_list[i])) will import the data associated with observation i into memory. The import_fun argument should be a function after the style of readRDS, where the object can be assigned a name once it is read in. The import_fun argument should NOT be like load, where the object loaded has a preassigned name.

Usage

prepare_sequential(
  import_list,
  import_fun = base::readRDS,
  x,
  splines,
  assembled,
  package = "base",
  call_args = list(),
  ...
)

Arguments

import_list

A vector or list whose elements tell import_fun which files to import.

import_fun

A function that will read each observation into memory based on the elements of import_list.

x

The list of arguments at which to evaluate each of the splines used to construct assembled.

splines

A list of spline-related objects. Each element of splines corresponds to the set of splines for the corresponding element of x.

assembled

A list of assembled_splines. See Examples.

package

A character string indicating the package to use for the computations. The choices are "base", "parallel", "pbapply", "future.apply", and "Rmpi". The default is "base", in which case a standard for loop is used. If package == "parallel", then mclapply is used, which is only appropriate when mc.cores is integer-valued or NULL. If package == "pbapply", then pblapply is used, which automatically provides a progress bar. If package == "future.apply", then future_lapply is used. If package == "Rmpi", then mpi.applyLB is used.

call_args

A named list providing relevant arguments to the mclapply, pblapply, future_lapply, or mpi.applyLB depending on the value of package.

...

Not implemented

Value

A prepared_sequential object

Author(s)

Joshua P. French

See Also

prepare, mclapply, pblapply, future_lapply, mpi.applyLB


hero documentation built on July 26, 2023, 5:11 p.m.