R/Double.R

Defines functions Double

Documented in Double

#' Double
#'
#' Comput the Double value of a vector
#'
#' The Double is calculated by multiplying each value by 2
#'
#' @param x A numeric vector
#'
#' @return A vector containing the Double values
#' @export
#'
#' @examples
#' Double(runif(3))

Double <- function(x){
  if(!is.numeric(x))
    stop("A numeric object Dude! Pleeeaaaaase!!!")
  return(2L*x)
}
slevionnois/MonPackage documentation built on May 14, 2019, 4:05 a.m.