gather_symbol: gather_symbol

View source: R/quantmod.R

gather_symbolR Documentation

gather_symbol

Description

Create symbol column by peeling prefix from column names

gather_symbol creates the symbol column of a data.frame from the prefix of other columns for use after converting from quantmod xts symbols.

Usage

gather_symbol(df, symbol = "symbol", index = "index", sep = ".",
  drop = TRUE)

Arguments

df

A data.frame or data.table with a symbol column

symbol

The name of the symbol column.

index

Columns not to rename. Also, attributes of this column are preserved.

sep

Separator between the symbol prefix and the column names.

drop

If TRUE (the default), symbols with dates of only NAs will be dropped.


e-mu-pi/adjustr documentation built on Sept. 26, 2024, 9:34 p.m.