lm_data: Toy data that makes no sense

Description Usage Format Examples

Description

Data arbitrarily created using:

1
2
3
 set.seed(333)
 lm_data = setNames(as.data.frame(runif(50, min = 0, max = 50)), 'y')
 lm_data$x = lm_data$y + 1

Usage

1

Format

An object of class data.frame with 50 rows and 2 columns.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(lm_data)
df_train = lm_data[1:25, ]
df_test = lm_data[26:50, ]

lm_int = lm(y ~ x, data = df_train)
lm_noint = lm(y ~ 0 + x, data = df_train)
list_lm = c('lm_int', 'lm_noint')

predicted = predict2(
  model = list_lm,
  newdata = df_test,
  actual = df_test$y,
  pred_type = 'response',
  write_model = FALSE,
  write_pred = FALSE,
  csv_name = 'none'
)
head(predicted)

bioticinteractions/predict2 documentation built on May 28, 2019, 7:12 p.m.