R/units.R

Defines functions french_to_diameter_mm diameter_mm_to_french

Documented in diameter_mm_to_french french_to_diameter_mm

#' French to diameter
#'
#' Convert French size of a catheter to diameter in mm. Currently accepts or
#' returns non-integer French values
#'
#' @param x Size in French units, or mm
#' @family unit conversions
#' @export
french_to_diameter_mm <- function(x) {
  stopifnot(x >= 0)
  x * 3
}

#' @rdname french_to_diameter_mm
diameter_mm_to_french <- function(x) {
  stopifnot(x >= 0)
  x / 3
}

Try the physiology package in your browser

Any scripts or data that you put into this service are public.

physiology documentation built on May 2, 2019, 8:58 a.m.