describeDate | R Documentation |
A function that returns the range of a date object.
describeDate(x, format = "%b %d, %Y", copula = " to ", FUN = range)
describeDateBy(
x,
by,
format = "%b %d, %Y",
copula = " to ",
FUN = range,
add_total_col = TRUE,
useNA = c("ifany", "no", "always"),
useNA.digits = 0L,
percentage_sign = FALSE
)
x , by |
vectors of dates and the variable to split |
format |
the date format; see |
copula |
character string to separate the range |
FUN |
a function to summarize |
add_total_col |
logical, |
useNA |
how to handle missing values, one of |
useNA.digits |
number of digits to use for missing percentages |
percentage_sign |
logical; if |
getDescriptionStatsBy
x <- c(1:4, NA, 5)
d <- as.Date(x, origin = Sys.Date())
y <- c(1, 1, 2, 2, 1, 3)
describeDate(x)
describeDateBy(d, y, copula = ' - ', format = '%d %B')
describeDateBy(d, y, percentage_sign = TRUE, useNA.digits = 2, FUN = min)
dd <- data.frame(x, y, d)
tabler_stat(dd, 'd', 'y')
tabler_stat2(dd, c(Integer = 'x', Date = 'd'), c(Byvar = 'y'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.