R/mylog.R

Defines functions mylog

#' My function: mylog
#'
#' @param x
#'
#' @return a vector of the same length as \code{x} with the \code{log} of \code{x}.
#' @export
#'
#' @examples
#' mylog(2)
#'
mylog <- function(x) {
    n <- length(x)
  res <- numeric(n)
  for (i in 1:n) {
    res[i] <- log(x[i])
  }
  return(res)
}
ndohpenngit/mypkg_ndoh documentation built on Nov. 4, 2019, 8:43 p.m.