How to get the each element of a string in R

Viewed 26

I have a string with the following:

ticker = c("BTC-USD", "^GDAXI")

How can I extract each element of this string, so that I can use paste0 for naming my list. Something like

names(Stocks) = paste0(ticker)

So that at the end the element in my lists have BTC-USD and then ^GDAXI as names

Thank You

0 Answers
Related