#' Rolling average
#'
#' Gets the rolling average for the time period and data specified
#' @param data, lengthOfRoll
#' @keywords sma, rolling, average
#' @return rollingAverage
#' @export
#' @examples
#' rollingAverage()
rollingAverage <- function(data, lengthOfRoll){
roll <- zoo::rollmean(data,lengthOfRoll)
return (roll)
}
#' Distribution
#'
#' Gets the prcing distribution of a dataset
#' @param (data, distribution)
#' @keywords distribution, analysis
#' @return newList
#' @export
#' @examples
#' rollingAverage()
priceDistribution <- function(data, distribution){
data
distribution
newList <- list(data, distribution)
return (newList)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.