basis_size: Extract basis dimension of a smooth

basis_sizeR Documentation

Extract basis dimension of a smooth

Description

Extract basis dimension of a smooth

Usage

basis_size(object, ...)

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

## S3 method for class 'gam'
basis_size(object, ...)

## S3 method for class 'gamm'
basis_size(object, ...)

Arguments

object

A fitted GAM(M). Currently mgcv::gam() (and anything that inherits from the "gam" class, e.g. mgcv::bam()) and mgcv::gamm() are supported.

...

Arguments passed to other methods.

Examples

load_mgcv()

df <- data_sim("eg1", n = 200, seed = 1)
m <- bam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = df)

basis_size(m)

gavinsimpson/gratia documentation built on April 24, 2024, 6:29 a.m.