createPartition: createPartition

View source: R/createPartition.R

createPartitionR Documentation

createPartition

Description

Constructs a partition vector given the number of folds and column of study design

Usage

createPartition(hM, nfolds = 10, column = NULL)

Arguments

hM

a fitted Hmsc model object

nfolds

number of cross-validation folds

column

name or index of the column in the studyDesign matrix, corresponding to the level for which units are splitted into folds

Value

a vector describing the fold of each sampling unit

Examples

# Create 3 folds for a HMSC object
partition = createPartition(TD$m, nfolds = 3)

Hmsc documentation built on Aug. 11, 2022, 5:11 p.m.