I am working with the below dataframe:
library(quantmod)
getSymbols("META",from=start,to=end)
class(META)
META<-data.frame(META)
class(META) # convert from xts to df
META
META$date<-as.Date(row.names(META))
head(META)
> head(META)
META.Open META.High META.Low META.Close META.Volume
2013-01-02 27.44 28.18 27.42 28.00 69846400
2013-01-03 27.88 28.47 27.59 27.77 63140600
2013-01-04 28.01 28.93 27.83 28.76 72715400
2013-01-07 28.69 29.79 28.65 29.42 83781800
2013-01-08 29.51 29.60 28.86 29.06 45871300
2013-01-09 29.67 30.60 29.49 30.59 104787700
META.Adjusted date
2013-01-02 28.00 2013-01-02
2013-01-03 27.77 2013-01-03
2013-01-04 28.76 2013-01-04
2013-01-07 29.42 2013-01-07
2013-01-08 29.06 2013-01-08
2013-01-09 30.59 2013-01-09
And I would like to re-arrange the column order, say for date column, I would like to re-arrange from the sixth column to first, may I know how should I do it? Thank you so much.