R/hex2num.R

Defines functions hex2num

Documented in hex2num

#' Hexadecimal to Number
#'
#' Convert hexadecimal string to number.
#'
#' @param x a hexadecimal string, like \code{"FF"}.
#'
#' @return Decimal number.
#'
#' @export

hex2num <- function(x)
{
  as.numeric(paste0("0x", x))  # 12x faster than as.hexmode(x)
}
arnima-github/arni documentation built on Oct. 28, 2023, 6:18 p.m.