SMA: SMA

View source: R/moving_averages.R

SMAR Documentation

SMA

Description

compute the Simple Moving Average of a vector.

Usage

SMA(x = NULL, n = 10, .fun = mean, na.rm = TRUE)

Arguments

x

numeric vector.

n

integer, the number of length of the moving average.

.fun

function, the function to use, for example mean, var, sd, ...

na.rm

logical,

Value

a vector of the same length of x.


beniamino98/cryptocompareR documentation built on June 19, 2024, 12:37 a.m.