options(rmarkdown.html_vignette.check_title = FALSE) knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
This vignette teaches you how makeup can help you when working with date values.
library(makeup) library(dstools)
One of the principal makeup argument is sample =
. In it you can set the output date format as you need for your project.
date_value <- as.Date("2020-03-04") # Example 1 makeup(v = date_value, sample = "Junio 4 de 2011") # Example 2 makeup(v = date_value, sample = "Junio 4 2011") # Example 3 makeup(v = date_value, sample = "4 de junio de 2011")
makeup also supports a wide variety of output format languages by setting locale =
argument from one of the package available_locales
:
available_locales
So, setting the locale argument makeup can work like this:
# Example 1 - Colombia makeup(v = date_value, locale = "es-CO") # Example 2 - Deutsch - Deutschland makeup(v = date_value, locale = "de-DE") # Example 3 - English-USA makeup(v = date_value, locale = "en-US") # Example 4 - Frenc - France makeup(v = date_value, locale = "fr-FR") # Example 5 - Portuguese - Brazil makeup(v = date_value, locale = "pt-BR")
You can set the output with a particular date format
. For example, if you need something like: "March 04 2020" you'll have to set the following combination:
%B --> Unabbreviated month
%d --> Day as a number
%Y --> 4-digit year
and with makeup you can:
# Example 1: format = "%B %d %Y" makeup(v = date_value, format = "%B %d %Y")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.