I've got a list of dataframe my_OHLCV_data and I'm having trouble creating a new column with a list with the correspondent names.
This is what I got:
print(my_OHLCV_data)
[[1]]
Open High Low Close Volume Adjusted
2019-03-11 8.61 8.8 5.9 8.54 12245200 8.54
[[2]]
Open High Low Close Volume Adjusted
2019-03-08 1.75 2.9 1.43 1.54 21725300 1.54
[[3]]
Open High Low Close Volume Adjusted
2019-02-22 2.78 4.54 2.72 3.3 68893400 3.3
print(symbols_names)
[1] "TTNP" "AVCO" "CCCL"
This is what I'm looking for:
print(my_OHLCV_data)
[[1]]
Open High Low Close Volume Adjusted Symbol
2019-03-11 8.61 8.8 5.9 8.54 12245200 8.54 TTNP
[[2]]
Open High Low Close Volume Adjusted Symbol
2019-03-08 1.75 2.9 1.43 1.54 21725300 1.54 AVCO
[[3]]
Open High Low Close Volume Adjusted Symbol
2019-02-22 2.78 4.54 2.72 3.3 68893400 3.3 CCCL
This is what I came up with and it wasn't even close:
my_OHLCV_data$name <- symbols_names
print(my_OHLCV_data)
[[1]]
Open High Low Close Volume Adjusted
2019-03-11 8.61 8.8 5.9 8.54 12245200 8.54
[[2]]
Open High Low Close Volume Adjusted
2019-03-08 1.75 2.9 1.43 1.54 21725300 1.54
[[3]]
Open High Low Close Volume Adjusted
2019-02-22 2.78 4.54 2.72 3.3 68893400 3.3
$name
[1] "TTNP" "AVCO" "CCCL"