Description Arguments Examples
Summarize Functions
data |
A dataframe or tibble. |
grouper |
(Optional) Group by column. |
names_to |
Passed to 'tidyr::pivot_longer()'. |
values_to |
Passed to 'tidyr::pivot_longer()'. |
na.rm |
TRUE if true NA are to be removed. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | library(tidyverse)
test_data <-
tibble(
Group = sample(c("Apple", "Pear"), size = 10, replace = TRUE),
A = sample(c(NA_integer_, 1:3), size = 10, replace = TRUE),
B = sample(c(NA_integer_, 4:6), size = 10, replace = TRUE),
C = sample(c(NA_real_, seq(from = 6.01, to = 6.09, by = 0.01)), size = 10, replace = TRUE)
)
summarize_variables(data = test_data,
incl_num_calc = FALSE)
summarize_variables(data = test_data,
incl_num_calc = TRUE)
summarize_variables(data = test_data,
incl_num_calc = TRUE,
grouper = Group)
summarize_variables(data = test_data,
incl_num_calc = FALSE,
grouper = Group)
observation_count(data = test_data)
value_count(data = test_data)
value_count(data = test_data,
grouper = Group)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.