create_formula: Create a formula

Description Usage Arguments Value Author(s) References Examples

View source: R/create_formula.R

Description

This function allows to create a formula from the columns of a data frame very quickly

Usage

1
create_formula(data, position = 1)

Arguments

data

a R data frame.

position

integer representing the position of the column in the data frame that we want to predict. The other columns are all considered as explanatory variables.

Value

a string that contains the formula. The formula is displayed with the following format: "Y ~ X1 + X2 + ..."

Author(s)

Simon CORDE

References

Link to the author's github package repository: https://github.com/Redcart/helda

Examples

1
2
3
4
data <- iris
str(data)
result <- create_formula(data = data, position = 4)
result

helda documentation built on Jan. 6, 2021, 5:09 p.m.