ychu066
2009-Nov-17 21:54 UTC
[R] re placing the dates format in R for exporting the data set...
hi everyone, i am having difficulties with replacing the dates format in R for exporting the data set... eg: the code that i used was toms_dat<- replace(toms_dat, toms_dat ==2009-08-06, 2) toms_dat<- replace(toms_dat, toms_dat ==2009-08-04, 1) but when i export the data as into txt file or excel file the dates come up with very large numbers .....:drunk: please help me ...=) -- View this message in context: http://old.nabble.com/replacing-the-dates-format-in-R-for-exporting-the-data-set...-tp26396492p26396492.html Sent from the R help mailing list archive at Nabble.com.
ychu066
2009-Nov-18 01:21 UTC
[R] re placing the dates format in R for exporting the data set...
moreover, how come when I export a dataframe out from R say, it become a excel file. The first column includes the inex number eg: 1,2,3 ......n instead of including the values that the first column should be have .... anyone know how to solve this problem ? ychu066 wrote:> > hi everyone, i am having difficulties with replacing the dates format in R > for exporting the data set... > > eg: the code that i used was > toms_dat<- replace(toms_dat, toms_dat ==2009-08-06, 2) > toms_dat<- replace(toms_dat, toms_dat ==2009-08-04, 1) > > but when i export the data as into txt file or excel file the dates come > up with very large numbers .....:drunk: > > please help me ...=) >-- View this message in context: http://old.nabble.com/replacing-the-dates-format-in-R-for-exporting-the-data-set...-tp26396492p26400287.html Sent from the R help mailing list archive at Nabble.com.
ychu066
2009-Nov-18 01:27 UTC
[R] re placing the dates format in R for exporting the data set...
Moreover, I want to rename the column name V1,V2,V3,V4.....V146. how do i write the code in R ??? thanks everyone that look at the thread/ ychu066 wrote:> > hi everyone, i am having difficulties with replacing the dates format in R > for exporting the data set... > > eg: the code that i used was > toms_dat<- replace(toms_dat, toms_dat ==2009-08-06, 2) > toms_dat<- replace(toms_dat, toms_dat ==2009-08-04, 1) > > but when i export the data as into txt file or excel file the dates come > up with very large numbers .....:drunk: > > please help me ...=) >http://old.nabble.com/file/p26400792/what.csv what.csv -- View this message in context: http://old.nabble.com/replacing-the-dates-format-in-R-for-exporting-the-data-set...-tp26396492p26400792.html Sent from the R help mailing list archive at Nabble.com.
jim holtman
2009-Nov-18 03:57 UTC
[R] re placing the dates format in R for exporting the data set...
First of all '2009-08-06' is 1995; this is probably not what you were expecting. What do you what your expression to do? Is 'toms_dat' a dataframe? if so, your expression 'toms_dat ==2009-08-06' seem strange. So tell us what you want to do, not how you want to do it. On Tue, Nov 17, 2009 at 4:54 PM, ychu066 <ychu066 at aucklanduni.ac.nz> wrote:> > hi everyone, i am having difficulties with replacing the dates format in R > for exporting the data set... > > eg: the code that i used was > toms_dat<- replace(toms_dat, toms_dat ==2009-08-06, 2) > toms_dat<- replace(toms_dat, toms_dat ==2009-08-04, 1) > > but when i export the data as into txt file or excel file the dates come up > with very large numbers .....:drunk: > > please help me ...=) > -- > View this message in context: http://old.nabble.com/replacing-the-dates-format-in-R-for-exporting-the-data-set...-tp26396492p26396492.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org 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. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?