grab_response: Grab a vector of responses from a model object

View source: R/grab_funs.R

grab_responseR Documentation

Grab a vector of responses from a model object

Description

Grab a vector of responses from a model object

Usage

grab_response(data, formula)

Arguments

data

data.frame from which to extract the vector of responses

formula

model formula

Value

a model.response

Examples

# Grab vector of responses for the first ten rows of iris data
fit <- lm(Sepal.Width ~ Petal.Width, data = iris)
grab_response(
  data = iris[1:10, ],
  formula(fit))

geex documentation built on Aug. 8, 2022, 5:05 p.m.