fill_na_ret: Fill missing values for a return time-series

Description Usage Arguments Details Value Examples

View source: R/TimeSeries.R

Description

Fill missing values for a return time-series

Usage

1
fill_na_ret(x, rpl = 0)

Arguments

x

xts with returns

rpl

value to replace missing values

Details

Missing values at the beginning of the time-series are persevered. Only the missing values after a non-missing value are replaced. E.g., the series NA, NA, 1, 5, NA, 7 would be replaced with NA, NA, 1, 5, 0, 7.

Value

x with NAs replaced by rpl

Examples

1
2

alejandro-sotolongo/InvestR documentation built on Jan. 9, 2021, 2:20 p.m.