powered by
Count the occurrences of each factor level or value in a vector.
tableNA(x)
numeric. An atomic vector or a factor.
An object of class "tableNA", which is the result of tabulate() with three attributes:
"tableNA"
tabulate()
type_of_x: the result of typeof(x);
type_of_x
typeof(x)
is_factor_x: the result of is.factor(x);
is_factor_x
is.factor(x)
levels: the result of levels(x).
levels
levels(x)
The number of missing values is always reported.
# NOT RUN { tableNA(c(1,2,2,1,3)) tableNA(c(1,2,2,1,3, NA)) # }
Run the code above in your browser using DataLab