#' Title
#'
#' qr.to.month transforms a quarter to the respective month.
#'
#' @param quarter is a integer from 1 to 4
#'
#' @return a integer cointained in the vector {1, 4, 7, 10}
#' @export
#'
#' @examples
qr.to.month <- function(quarter) {
if (quarter %in% c(1, 2, 3, 4)) {
(3 * (quarter - 1)) + 1
} else {
message("Quarter expects a integer from 1 to 4")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.