Redirect input dataset to an output R object.

redirectDataset(
  dataset = cs.in.dataset(),
  preds = cs.in.predictors(),
  resps = cs.in.responses(),
  groups = cs.in.groupvars(),
  auxs = cs.in.auxiliaries(),
  scriptvars = cs.in.scriptvars(),
  return.results = FALSE
)

Arguments

dataset

[data.frame]
Dataset with named columns. The names correspond to predictors and responses.

preds

[character]
Character vector of predictor variables.

resps

[character]
Character vector of response variables.

groups

[character]
Character vector of group variables.

auxs

[character]
Character vector of auxiliary variables.

scriptvars

[list]
Named list of script variables set via the Cornerstone "Script Variables" menu. For details see below.

return.results

[logical(1)]
If FALSE the function returns TRUE invisibly. If TRUE, it returns a list of results. Default is FALSE.

Value

Logical [TRUE] invisibly and outputs to Cornerstone cs.out.Robject or, if return.results = TRUE, list of resulting data.frame objects and character(n) vectors:

dataset

Input dataset.

predictors

Vector of predictors.

responses

Vector of responses.

groups

Vector of groups.

auxiliaries

Vector of auxiliaries.

The list is wrapped in an additional list to get the same return value corresponding to cs.in.Robject.

Details

The following script variables are summarized in scriptvars list:

remove.pattern

[character(1)]
The given pattern is removed in all variable names via gsub. Leading and / or trailing whitespaces are removed using trimws. Default is "".