cross_count {baizer} | R Documentation |
count two columns as a cross-tabulation table
cross_count(df, row, col, method = "n", digits = 2)
df |
tibble |
row |
the column as rownames in the output |
col |
the column as colnames in the output |
method |
one of |
digits |
the digits of ratios |
data.frame
cross_count(mini_diamond, cut, clarity)
# show the ratio in the row
cross_count(mini_diamond, cut, clarity, method = "rowr")
# show the ratio in the col
cross_count(mini_diamond, cut, clarity, method = "colr")