[R] Summarizing data containing data/time information (as factor)

arun smartpink111 at yahoo.com
Thu Sep 6 03:08:48 CEST 2012


Hi,

I couldn't find any attached data.  Could you dput() the data?
A.K.



----- Original Message -----
From: HJ YAN <yhj204 at googlemail.com>
To: r-help at r-project.org
Cc: 
Sent: Wednesday, September 5, 2012 7:57 PM
Subject: [R] Summarizing data containing data/time information (as factor)

Dear R user

I want to create a table (as below) to summarize the attached data
(Test.csv, which can be read into R by using 'read.csv(Test.csv, header=F)'
), to indicate the day that there are any data available, e.g.value=1 if
there are any data available for that day, otherwise value=0.


              28/04     29/04    30/04    01/05   02/05
532703     0              1         1           1        0
532704     1              1         1           1        1
532705     0              0         1           1        0

Only Column A (Names: automatically stored as integer if being read into R)
and Column B (date/time: automatically stored as factor if being read into
R) are useful for this task.

Could anyone kindly provide me some hints/ideas about how to write some
code to to this job please?


Many thanks in advance!

Best wishes
HJ

______________________________________________
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.





More information about the R-help mailing list