Learn R Programming

htsr (version 2.1.6)

h_addna: Add NA values within a time series

Description

Add NA values within a time series

Usage

h_addna(file, add)

Arguments

file

File name to proceed

add

List of dates with NA values to be added

Author

P. Chevallier - November 2022

Details

The function adds records with NA in a time series at given dates. If the date already exists, the value is replaced by NA

The output file is named with a nap_ prefix.

Examples

Run this code
if (FALSE) {

f <- h_addna (f, add = c("2021-01-01 12:00:00 UTC", "2031-01-01 12:00:00 UTC"))
}

Run the code above in your browser using DataLab