Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

data_slice

Prepare a data slice through covariates


Description

Prepare a data slice through covariates

Usage

data_slice(object, ...)

## Default S3 method:
data_slice(object, ...)

## S3 method for class 'gam'
data_slice(
  object,
  var1,
  var2 = NULL,
  var3 = NULL,
  var4 = NULL,
  data = NULL,
  n = 50,
  offset = NULL,
  ...
)

## S3 method for class 'list'
data_slice(object, ...)

Arguments

object

an R model object.

...

arguments passed to other methods.

var1

character;

var2

character;

var3

character; ignored currently.

var4

character; ignored currently.

data

a 1-row data frame or tibble containing values for variables in the fitted model that are not varying in the slice.

n

numeric; the number of values to create for each of var1 and var2in the slice.

offset

numeric; value to use for an offset term in the model.


gratia

Graceful 'ggplot'-Based Graphics and Other Functions for GAMs Fitted Using 'mgcv'

v0.6.0
MIT + file LICENSE
Authors
Gavin L. Simpson [aut, cre] (<https://orcid.org/0000-0002-9084-8413>), Henrik Singmann [ctb] (<https://orcid.org/0000-0002-4842-3657>)
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.