smooth_dim: Dimension of a smooth

smooth_dimR Documentation

Dimension of a smooth

Description

Extracts the dimension of an estimated smooth.

Usage

smooth_dim(object)

## S3 method for class 'gam'
smooth_dim(object)

## S3 method for class 'gamm'
smooth_dim(object)

## S3 method for class 'mgcv.smooth'
smooth_dim(object)

Arguments

object

an R object. See Details for list of supported objects.

Details

This is a generic function with methods for objects of class "gam", "gamm", and "mgcv.smooth".

Value

A numeric vector of dimensions for each smooth.

Author(s)

Gavin L. Simpson


gratia documentation built on Feb. 16, 2023, 10:40 p.m.