add.data
Add a dataset to a SPEARobject. Needs to have the same number of datasets/columns as SPEARobject$data$train$Xlist
. Response not required (will be recorded as NULL). Can be accessed via SPEARobject$data$__name__
.
Add a dataset to a SPEARobject. Needs to have the same number of datasets/columns as SPEARobject$data$train$Xlist
. Response not required (will be recorded as NULL). Can be accessed via SPEARobject$data$__name__
.
add.data(X, Y = NULL, Z = NULL, name = NULL)
Argument |Description
------------- |----------------
X
| List of explanatory dataset matrices. Needs to have same column names and length (number of matrices) as SPEARobject$data$Xlist.
Y
| Response matrix. Needs to have the same number of rows/length as the number of rows in parameter X
. Defaults to NULL
(not required).
Z
| Full matrix with all data. Cannot have missing values; must be imputed. If left blank (NULL
) will be equivalent to do.call("cbind", X)
after imputation.
name
| Name for the stored dataset in the SPEARobject. Access via SPEARobject$data$__name__
.
SPEARobj <- make.SPEARobject(...)
X.test = ... # Define X.test as a list of matrices that have the same columns as SPEARobj$data$train$Xlist
SPEARobj$add.data(X = X.test) # will default name to "dataset1"
X.test2 = ...
Y.test2 = ...
SPEARobj$add.data(X = X.test2, Y = Y.test2, name = "test2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.