coef: Extract coefficients from a function

coef.functionR Documentation

Extract coefficients from a function

Description

coef will extract the coefficients attribute from a function. Functions created by applying link{makeFun} to a model produced by lm(), glm(), or nls() store the model coefficients there to enable this extraction.

Usage

## S3 method for class ''function''
coef(object, ...)

Arguments

object

a function

...

ignored

Examples

if (require(mosaicData)) {
  model <- lm( width ~ length, data = KidsFeet)
  f <- makeFun( model )
  coef(f)
}

mosaicCore documentation built on Nov. 5, 2023, 9:06 a.m.