Learn R Programming

gratia (version 0.9.0)

nested_rug_values: Values for rug plot in nested form

Description

Extracts original data for smooth terms, formats them in long/tidy format, then nests the data column(s) such that the result is a nested data frame with one row per smooth.

Usage

nested_rug_values(object, terms = NULL, data = NULL)

Value

A nested tibble (data frame) with one row per smooth term.

Arguments

object

a fitted GAM model

terms

a vector of terms to include original data for. Passed to argument terms of mgcv::predict.gam()].

data

optional data frame