#' Number of days in a year, including leap days
#'
#' @param year four-digit year (character, numeric, or integer)
#' @return integer
#'
#' @importFrom lubridate leap_year
#'
#' @export
ndays_in <- function (year) {
tryCatch(
365 + lubridate::leap_year(as.integer(year)),
error = function (e) NULL)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.