Hi Dude!!
It seems that your column names are not sequentially arranged, I guess,
If so u just reorder them and do it your way...it will work..
for example,
colnames(data)[2]<–"weekly.returns" ## sometimes u can use like this as
well, if u want to assign at last most column
## in
your data frame
##
names(data)[ncol(data)]<–"weekly.returns"
and
colnames(data)[1]<– "date"
I hope it will work for your bug!!!
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-create-the-data-frame-tp4636111p4636117.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.