Make vectors for foldid and weights to be used for leave-one-study-out
cross-validation with glmnet::glmnet()
.
Usage
makeGlmnetArgs(metadata, foldidColname = "study", sampleColname = "sample")
Arguments
- metadata
data.frame
containing a row for each observation.
- foldidColname
column to use for grouping observations.
- sampleColname
column that contains sample names.
Value
A named list.
- foldid
vector of integers
- weights
vector of weights, such that each study is weighted equally.