pivot_labels | R Documentation |
pivot_format
Labels for pivot_format
pivot_labels(
stats = "Statistic",
n = "N",
p = "%",
p_col = "Col %",
p_row = "Row %",
rows = NULL,
cols = NULL
)
stats |
Name of statistics column. |
n |
Count. |
p |
Percentage. |
p_col |
Column perc. |
p_row |
Row perc. |
rows, cols |
Labels for variables use as rows/cols. |
a list
that can be use in pivot_format
.
library(flexpivot)
library(magrittr)
data("nobel_laureates")
# Change labels displayed in table
nobel_laureates %>%
pivot_table("category", "gender", na_label = "Manquant") %>%
pivot_format(
labels = pivot_labels(
stats = "Statistique",
n = "Effectif",
p = "Pourcentage",
p_col = "% colonne",
p_row = "% ligne",
rows = c("Categorie"),
cols = "Genre"
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.