spread_symbol | R Documentation |
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.
spread_symbol(df, symbol = "symbol", index = "index", sep = ".",
drop = TRUE)
df |
A |
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.