R/dlog.R

Defines functions dlog

Documented in dlog

#' Create log difference distribution
#'
#' @description Calculate log distribution and calculate difference within rows
#'
#' `r lifecycle::badge('stable')`
#'
#' @param x - matrix with one or more column
#'
#' @return - dataframe
#' @export
#'
#' @examples
#'
#' library(magrittr)
#' library(lazytrade)
#' m <- seq(1:1000) %>% as.matrix(10) %>% dlog()
#'
#'
dlog <- function(x) {


  Step2 <- diff(log(x))

  return(Step2)
}

Try the lazytrade package in your browser

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

lazytrade documentation built on Dec. 16, 2021, 1:06 a.m.