I'm totally new to R and programming!
I'm importing daily stock data using quantmod in R. I've created an object to import all the data at once.
MyStock <- c("AAPL","FB",...)
The names of each column includes the ticker name (eg. AAPL.Open) which I would simply like to rename (Open). I can do that with colnames() for each ticker but I would like to do it using my object to save time. How do I do that?
Thanks!