R/forint.R

Defines functions forint

Documented in forint

#' Formats numbers as Hungarian Forint
#' @param x numeric vector
#' @return string
#' @export
#' @importFrom checkmate assert_number
#' @importFrom scales dollar
#' @examples
#' forint(42)
#' forint(10000000.213214)
#' forint(1:10)
forint <- function(x) {
  assert_numeric(x)
  dollar(x, prefix = "", suffix = " Ft")
}
steveJ34/Mastering-R-HW1 documentation built on Dec. 23, 2021, 5:32 a.m.