R/commaChar2Numeric.R

Defines functions commaChar2Numeric

Documented in commaChar2Numeric

#' Convert a char with comma to a numeric
#'
#' Convert a char with comma to a numeric
#'
#' @param x vector of chars with commas
#' @return a vector of numeric
#' @examples
#'
#' commaChar2Numeric(c("2,456", "1,234"))
#' 
#' @export
commaChar2Numeric <- function(x) {
  as.numeric(gsub(",", ".", x))
}
lbraglia/yapomif documentation built on May 20, 2019, 11:26 p.m.