View source: R/split_dataset.R
split_dataset | R Documentation |
split dataset in training and test set either by grouping vector or randomly
split_dataset(exprs, pheno, method = "random", prop = 0.25, grouping = NULL)
exprs |
non-negative numeric matrix with features as rows, and scRNA-Seq profiles as columns. 'ncol(sc.counts)' must equal 'nrow(sc.pheno)' |
pheno |
data frame with scRNA-Seq profiles as rows, and pheno entries in columns. 'nrow(sc.pheno)' must equal 'ncol(sc.counts)' |
method |
string specifying method of splitting; either 'random' (default) or 'predefined' |
prop |
numerical, fraction of profiles to be used as test set |
grouping |
factor with 2 levels (training == 1, test == 2), and 'length(grouping)' must be 'ncol(sc.counts)'. Assigns each scRNA-Seq profile to either test or train cohort. |
list containing two lists: 1) training 2) test both lists contain two entries: 1) exprs - non-negative numeric matrix with features as rows, and scRNA-Seq profiles as columns. 'ncol(sc.counts)' must equal 'nrow(sc.pheno)' 2) pheno - data frame with scRNA-Seq profiles as rows, and pheno entries in columns. 'nrow(sc.pheno)' must equal 'ncol(sc.counts)'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.