Shows the variable label, factor levels (i.e., value labels) and frequency distribution for the specified variable.

inspect(data, x, ...)

Arguments

data

A data frame of class data.frame or tbl_df.

x

A string identifying the name of the variable to be inspected.

...

Other arguments to be passed down, currently unimplemented.

Value

A list with a variable label (if present), factor levels/value labels (if present) and a frequency distribution

Examples

data(france) inspect(france, "vote")
#> $variable_label #> [1] "No Label Found" #> #> $value_labels #> [,1] #> [1,] "PCF" #> [2,] "PS" #> [3,] "Green" #> [4,] "RPR" #> [5,] "UDF" #> #> $freq_dist #> freq prop #> PCF 54 0.100 #> PS 217 0.400 #> Green 58 0.107 #> RPR 114 0.210 #> UDF 99 0.183 #>