datagen | R Documentation |
For each smooth in a GAM, generate new data over the range of the variables
involved in a smooth. This function is deprecated as it is only useful for a
very narrow use-case. Use data_slice()
instead.
datagen(x, ...)
## S3 method for class 'mgcv.smooth'
datagen(x, n = 100, data, ...)
## S3 method for class 'fs.interaction'
datagen(x, n = 100, data, ...)
## S3 method for class 'gam'
datagen(x, smooth = NULL, n = 200, ...)
## S3 method for class 'gamm'
datagen(x, ...)
## S3 method for class 'list'
datagen(x, ...)
x |
an object for which new data is required. Currently objects of
classes |
... |
arguments passed to methods |
n |
numeric; the number of data values to generate per term in each smooth. |
data |
data frame; for |
A data frame of new values spread over the range of the observed values.
Gavin L. Simpson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.