DataPartition {LOGANTree} | R Documentation |
Data Partition
Description
Data Partition
Usage
DataPartition(data = NULL, outcome = NULL, proportion = 0.7, seed = 2022)
Arguments
data |
A |
outcome |
A character string with the name of the outcome variable from the data. |
proportion |
A numeric value for the proportion of data to be put into model training. Default is set to 0.7. |
seed |
A numeric value for set.seed. It is set to be 2022 by default. |
Value
This function returns a list with training and testing data sets using a stratified selection by the outcome variable as performed by the createDataPartition function from the caret package.
Examples
dp <- DataPartition(data = cp025q01.wgt, outcome = "outcome")
[Package LOGANTree version 0.1.1 Index]