Learn R Programming

scan (version 0.56)

as_scdf: as_scdf Converts a data frame to an scdf object.

Description

as_scdf Converts a data frame to an scdf object.

Usage

as_scdf(
  object,
  cvar = "case",
  pvar = "phase",
  dvar = "values",
  mvar = "mt",
  phase_names = NULL,
  sort_cases = FALSE
)

Arguments

object

A data.frame

cvar

Sets the variable name of the "case" variable. Defaults to "case".

pvar

Sets the variable name of the "phase" variable. Defaults to "phase".

dvar

Sets the variable name of the "values" variable. Defaults to "values".

mvar

Sets the variable name of the "mt" variable. Defaults to "mt".

phase_names

A character vector with phase names. Defaults to the phase names provided in the phase variable.

sort_cases

If set TRUE, the resulting list is sorted by label names (alphabetically increasing).