sample_learning_states: Sample learning states reproducibly

View source: R/learning_states.R

sample_learning_statesR Documentation

Sample learning states reproducibly

Description

Samples without replacement from the distinct states of the selected categories, so the result never repeats a state.

Usage

sample_learning_states(n, categories = "all", seed = NULL)

Arguments

n

Number of unique states to draw. A single positive whole number, at most the number of distinct states in the selected categories.

categories

Categories passed to learning_states(), defaulting to "all".

seed

Optional random seed.

Value

A tidy base data.frame with n rows, one per sampled state, and columns order (the selection order, 1:n), category and state. A state belonging to several categories gets all of them in category, joined by ";".

Examples

sample_learning_states(n = 6, categories = "cognitive", seed = 1)

simulab documentation built on Oct. 15, 2026, 5:08 p.m.