Learn R Programming

yfhist (version 0.1.3)

get_col: Get a Column from the Yahoo Finance API

Description

A function to get a column from the Yahoo Finance API for symbols using a date range and interval.

Usage

get_col(data, col)

Value

A data frame with rows as the index and columns as the symbols.

Arguments

data

data frame or list. Data that contains an index column and the requested column created using the get_data function.

col

string. Column name to get (i.e., "open", "high", "low", "close", "adjclose", "volume").

Examples

Run this code
if (FALSE) {
data <- get_data(c("AAPL", "MSFT"))

adj <- get_col(data, "adjclose")
}

Run the code above in your browser using DataLab