spread_symbol: spread_symbol

View source: R/quantmod.R

spread_symbolR Documentation

spread_symbol

Description

Spread symbol column across numeric columns

spread_symbol moves the symbol column of a data.frame to prefix the numeric columns so it is not dropped when converting to xts.

Usage

spread_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 symbols and the column names.

drop

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


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