make_newdata | R Documentation |
Creates or converts a dataframe of covariates to pass to
predict.sbm
, based on the data
used in the model to be
used for prediction.
make_newdata(formula, data, newdata = NULL)
formula |
A two-sided formula of the form
|
data |
A dataframe containing the fields named in formula. |
newdata |
A dataframe of covariate values with fields matching variables
in |
When newdata
is missing, a new dataframe is created with
numeric variables held at their mean values, and all combinations of factors.
When a newdata
dataframe is provided it is checked for compatibility
with formula
variables, and character variables are converted to factors,
but otherwise passed unchanged.
A dataframe of covariate values.
data(BCI_speed_data)
make_newdata(speed ~ species, BCI_speed_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.