get_data_from_lm: get raw data from lm or glm

Description Usage Arguments Value Examples

View source: R/linear.tools.R

Description

get raw data from lm or glm

Usage

1

Arguments

modle

a lm or glm.

Value

a data.frame used as raw data for the model.

Examples

1
2
3
4
5
6
7
data_used = ggplot2::diamonds[0:10,]
model = lm(price~ cut + carat + I(carat^2) + I(carat^3) +
             I(carat  * depth) + cut:depth, data_used) # a GLM
get_data_from_lm(model)

data_used = 'data_used is deleted in this environment'
get_data_from_lm(model)

linear.tools documentation built on May 2, 2019, 3:17 a.m.