n_obs_x: Number of valid (i.e. non-missing) observations for column/variable x
Description
Computes the number of valid (i.e. non-missing) observations for the column/variable of interest.
Usage
n_obs_x(df, by, x, svy = NULL)
Value
Data frame containing the number of valid (i.e. non-missing) observations for the variable of interest
Arguments
df
(data frame) Data to analyse with lowercase column names.
by
(string vector) Variable(s) used for tabulating the variable of interest
x
(string) Variable of interest for which to compute the number of valid (i.e. non-missing) observations
svy
(string) Survey settings that must be equal to one of the following: ALL, IALS, ICCS, ICILS, IELS,
PBTS, PIAAC, PIRLS, PISA, PISAOOS, PISA2015, SSES, SSES2023, SVY, TALISSCH, TALISTCH, TALISEC_LEADER, TALISEC_STAFF, TIMSS