n_obs_x {Rrepest} | R Documentation |
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)
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 |
Value
Data frame containing the number of valid (i.e. non-missing) observations for the variable of interest
Examples
n_obs_x(df = df_pisa18, by = "cnt",x = "wb173q03ha", svy = "PISA2015")
n_obs_x(df = df_talis18, by = "cntry",x = "tt3g01", svy = "TALISTCH")
[Package Rrepest version 1.5.4 Index]