
Last chance! 50% off unlimited learning
Sale ends in
lifecycle::badge("experimental")
Summarizes all numeric columns. Counts the NA
s and Inf
s in the columns.
summarize_metrics(data, cols = NULL, na.rm = TRUE, inf.rm = TRUE)
tibble
where each row is a descriptor of the column.
The Measure column contains the name of the descriptor.
The NAs row is a count of the NA
s in the column.
The INFs row is a count of the Inf
s in the column.
data.frame
with numeric columns to summarize.
Names of columns to summarize. Non-numeric columns are ignored. (Character)
Whether to remove NA
s before summarizing. (Logical)
Whether to remove Inf
s before summarizing. (Logical)
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
# Attach packages
library(cvms)
library(dplyr)
df <- data.frame("a" = c("a", "a", "a", "b", "b", "b", "c", "c", "c"),
"b" = c(0.8, 0.6, 0.3, 0.2, 0.4, 0.5, 0.8, 0.1, 0.5),
"c" = c(0.2, 0.3, 0.4, 0.6, 0.5, 0.8, 0.1, 0.8, 0.3))
# Summarize all numeric columns
summarize_metrics(df)
# Summarize column "b"
summarize_metrics(df, cols = "b")
Run the code above in your browser using DataLab