new_cnd_df {sdtm.oak}R Documentation

Create a data frame with filtering tags

Description

new_cnd_df() creates a conditioned data frame, classed cnd_df, meaning that this function extends the data frame passed as argument by storing a logical vector cnd (as attribute) that marks rows for posterior conditional transformation by methods that support conditioned data frames.

Usage

new_cnd_df(dat, cnd, .warn = TRUE)

Arguments

dat

A data frame.

cnd

A logical vector. Length must match the number of rows in dat.

.warn

Whether to warn about creating a new conditioned data frame in case that dat already is one.

Value

A data frame dat with the additional class "cnd_df" and the following attributes:

See Also

is_cnd_df(), get_cnd_df_cnd(), get_cnd_df_cnd_sum(), rm_cnd_df().


[Package sdtm.oak version 0.1.0 Index]