Description Usage Arguments Value Examples
this fxn wraps createDataPartition
1 | StratifiedPartition(cohort_df, grp_col = "pt", target_col = "fx")
|
cohort_df |
data.frame |
grp_col |
chr(1) |
target_col |
chr(1) |
data.frame with same number of rows and an additional column 'partition' with values train and test
1 2 3 4 5 6 | StratifiedPartition(mtcars, grp_col="am", target_col="mpg") %>% s
StratifiedPartition(mtcars, grp_col="am", target_col="mpg") %>% select(am, partition) %>% table_()
StratifiedPartition(hipsCohort(), grp_col = "device_model") %>% select(device_model, partition) %>% table_()
StratifiedPartition(hipsCohort()) %>% select(pt, partition) %>% table_()
try(StratifiedPartition(hipsCohort() %>% sample_n(500)) %>% select(pt, partition) %>% table_())
StratifiedPartition(hipsCohort()) %>% attributes() %>% s
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.