add_models: Add models to a data.frame

View source: R/add.R

add_modelsR Documentation

Add models to a data.frame

Description

Add models to a data.frame

Usage

add_models(
  input_df,
  var_order,
  model_subset = NULL,
  model_remove = NULL,
  model_add = NULL,
  verbose = TRUE
)

Arguments

input_df

Data.frame with at least three columns. values contains the actual values. variables contains the variable belonging of the values. var_order contains the integers from 1 to n corresponding to the ordering of the values.

var_order

Character value. The variable that corresponds to the order of the values.

model_subset

Character value. Used as a regex to subset models. Use validModelNames() to obtain all model names that are known to SPATA2 and showModels() to visualize them.

model_remove

Character value. Used as a regex to remove models are not supposed to be included.

model_add

Named list. Every slot in the list must be either a formula containing a function that takes a numeric vector as input and returns a numeric vector with the same length as its input vector. Or a numeric vector with the same length as the input vector. Test models with showModels().


kueckelj/SPATA2 documentation built on March 16, 2024, 10:25 a.m.