Learn R Programming

butcher (version 0.3.5)

locate: Locate part of an object.

Description

Locate where a specific component of a object might exist within the model object itself. This function is restricted in that only items that can be axed can be found.

Usage

locate(x, name = NULL)

Value

Location of specific component in a model object.

Arguments

x

A model object.

name

A name associated with model component of interest. This defaults to NULL. Possible components include: env, call, data, ctrl, and fitted.

Examples

Run this code
lm_fit <- lm(mpg ~ ., data = mtcars)
locate(lm_fit, name = "env")
locate(lm_fit, name = "call")

Run the code above in your browser using DataLab