What’s best practice with {testthat} for testing an #RStats function that relies on the current date? e.g.
days_from_today <- function(date) {
as.numeric(as.Date(date) - Sys.Date())
}
=> More informations about this toot | View the thread | More toots from ellakaye@fosstodon.org
=> View rstats tag This content has been proxied by September (3851b).Proxy Information
text/gemini