extract_varnames: Function to extract the different elements of a formula

Description Usage Arguments Value

View source: R/hmi_smallfunctions_2018-01-21.R View source: R/hmi_smallfunctions_2017-12-28.R View source: R/hmi_smallfunctions_2017-12-20.R View source: R/hmi_smallfunctions_2017-11-14.R View source: R/hmi_smallfunctions_2017-09-14.R View source: R/hmi_smallfunctions_2017-09-01.R View source: R/hmi_smallfunctions_2017-02-21.R View source: R/hmi_smallfunctions_2017-02-05.R View source: R/hmi_smallfunctions_2017-01-13.R View source: R/hmi_smallfunctions_2017-01-05.R View source: R/hmi_smallfunctions_2016-12-22_01.R View source: R/hmi_smallfunctions_2016-12-14_04.R View source: R/hmi_smallfunctions_2016-12-14_03.R

Description

The function searches for the target variable, fixed effects variables, if there is a cluster ID: this and the random effects variables.
The names of the fixed and random intercepts variable (if existent) are explicitly labelled.

Usage

1
2
extract_varnames(model_formula = NULL, constant_variables,
  variable_names_in_data)

Arguments

model_formula

A formula (from class formula)

constant_variables

A Boolean-vector of length equal to the number of columns in the data set specifying whether a variable is a constant variable (eg. an intercept variable) or not.

variable_names_in_data

A character-vector with the column names of the data set.

Value

A list with the names of the target variable, the intercept variable, the fixed and random effects covariates and the cluster id variable.
If some of them doesn't exist, they get the value "".


matthiasspeidel/hmi documentation built on Aug. 18, 2020, 4:37 p.m.