select_cases: Select a subset of cases from an scdf

View source: R/select_cases.R

select_casesR Documentation

Select a subset of cases from an scdf

Description

This function allows to select a subset of cases from an scdf by specifying either the case names or their numeric indices. Negative selection is also supported.

Usage

select_cases(scdf, ...)

Arguments

scdf

A single-case data frame. See scdf() to learn about this format.

...

Selection criteria. Either numeric, objectnames, or as characters.

Value

An scdf with a subset of cases.

Author(s)

Juergen Wilbert

See Also

Other data manipulation functions: add_l2(), as.data.frame.scdf(), as_scdf(), batch_apply(), fill_missing(), moving_median(), print.sc_outlier(), ranks(), rescale(), scdf(), set_vars(), shift(), smooth_cases(), standardize(), truncate_phase()

Examples

select_cases(exampleAB, Johanna, Karolina)
select_cases(exampleAB, c(Johanna, Karolina))
select_cases(exampleAB, 1,2)
select_cases(exampleAB, 1:2)
select_cases(exampleAB, -Johanna)
select_cases(exampleAB, -c(Johanna, Karolina))
v <- c("Moritz", "Jannis")
select_cases(exampleA1B1A2B2, v)

scan documentation built on April 1, 2026, 9:06 a.m.