df.fill.na {BatchGetSymbols}R Documentation

Replaces NA values in dataframe for closest price

Description

Helper function for BatchGetSymbols. Replaces NA values and returns fixed dataframe.

Usage

df.fill.na(df.in)

Arguments

df.in

DAtaframe to be fixed

Value

A fixed dataframe.

Examples


df <- data.frame(price.adjusted = c(NA, 10, 11, NA, 12, 12.5, NA ), volume = c(1,10, 0, 2, 0, 1, 5))

df.fixed.na <- df.fill.na(df)


[Package BatchGetSymbols version 2.6.4 Index]