save_n: Save numer of cases as numeric value

View source: R/save_n.r

save_nR Documentation

Save numer of cases as numeric value

Description

Simply a convenient function to save the number of cases of a data frame. This function primarily serves to provide values for the wrapper function sample_sizes.

Usage

save_n(data)

Arguments

data

A data frame.

Value

A numeric value.

Examples

d <- mtcars
save_n(d)
save_n(d[1:4,])

# In combination with the function "sample_sizes"
sample_sizes(save_n(d),
             save_n(d[1:4,]),
             sample = c("Sample 1", "Sample 2", 
             print = TRUE))

masurp/pmmisc documentation built on May 3, 2024, 7:13 p.m.