Re: [R] How to fix the format in write.csv

2014-05-02 Thread Duncan Mackay
northnet.com.au -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jim Lemon Sent: Saturday, 3 May 2014 07:21 To: Bert Gunter Cc: r-help@r-project.org Subject: Re: [R] How to fix the format in write.csv Hi ChangJiang, Date conversion is one

Re: [R] How to fix the format in write.csv

2014-05-02 Thread ChangJiang Xu
Thanks. I still didn't get the solution. For example, I have a data frame, called temp > temp Chr Ref Var AFFUNAFF AFF.test pvalue 1 10 A G 2/1/240/0/1905/49 2.429e-09 2 18 G A 1/9/17 0/23/167 11/43 2.484e-04 3 1 G A 2/2/220/8/176 6/

Re: [R] How to fix the format in write.csv

2014-05-02 Thread Jim Lemon
Hi ChangJiang, Date conversion is one of the biggest headaches with Excel. Even if you import those data into Excel and then specify that the column should be "text" format, it won't convert the values back into what they originally were. Be aware that Excel may, when encountering dates from a

Re: [R] How to fix the format in write.csv

2014-05-02 Thread Bert Gunter
ChangJiang: Open the .csv file with Notepad or other plain vanilla text processor, NOT EXCEL. You will find that the columns are text. Excel automatically converts them to dates. Read Excel's docs or get help from someone to learn how to convert the dates back to text. -- Bert Bert Gunter Gene

Re: [R] How to fix the format in write.csv

2014-05-02 Thread Bert Gunter
Read your Excel documentation. AFAIK, R just writes text files -- you need to tell Excel how to read them in. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." H. Gilbert Wel