FAM_classes: FAM classes

Description Usage Arguments Details Value Functions

Description

FAM provides these helper functions to construct objects belonging to S3 classes from the FAM package, or to quickly check if an R object inhereits from one of the FAM package's classes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
as_LB4L(data, tables = attr(data, "tables"), IDvars = vapply(groups(data),
  as.character, character(1L)), experiment = attr(data, "experiment"),
  practice_tests = attr(data, "practice_tests"))

as_LB4L_summary(data, ...)

as_LB4L_CD_summary(data, ...)

is.LB4L(x)

is.LB4L_summary(x)

is.LB4L_CD_summary(x)

Arguments

data

An R object that is, or can be coerced to, a data frame.

tables

A list of named character vectors which give the name of the datasets holding observations from each experimental phase. The datasets can take any names, but the names of each item in the list must be one of "study", "study_practice", "test_practice" or "final".

IDvars

A Character vector specifying variables that can be used to group the data (see group_by). Defaults to the variables given by any present grouping.

experiment

A character vector giving the name of the experiment. Used to name figures and any prefix any saved Rda/Rds objects.

practice_tests

A numeric scalar giving the number of practice tests taken.

x

an R object

Details

It is unlikely the end-user should need to call these functions, but this page serves to document their behavior should they need to be used externally from the FAM package, and to give more information on the structure of the S3 classes implemented by the FAM package.

Value

The as* functions (e.g.,as.LB4L_IV, as.LB4L_IV_summary) will construct data frames (by coercing their inputs with as.data.frame) with the primary class specificed by the function (e.g., as.LB4L_IV gives the data frame the primary class "LB4L)_IV").

The is* functions (e.g.,is.LB4L_IV, is.LB4L_IV_summary) return logical scalars. They will return TRUE if the object has that specific class (i.e.,LB4L_IV, LB4L_IV_summary, etc.) as it's first value of the class attribute.

Functions


wjhopper/FAM documentation built on May 4, 2019, 7:33 a.m.