(R) functions for tables/ table(), ftable(),addmargins(), prop.table(), margin.table()
table function is generally used for the frequency of each elements in variables. *table of a variable (a variable: gender)> x = c(rep("M", 3), rep("F", 2), rep(NA, 3))> x[1] "M" "M" "M" "F" "F" NA NA NA > table(x)xF M 2 3 Without 'exclude=NULL' we reject missing values automatically. If you want to add NA in the table, you can add 'exclude=NULL' Include NA in table Not include NA in table >tabl..
2020. 11. 8.