Re: [R] Summing daily values by weekday and weekend

2011-07-22 Thread Hu, Yinghua
Jeff, Thanks for the hint. It is a good solution. Thanks! From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us] Sent: Thursday, July 21, 2011 7:00 PM To: Hu, Yinghua; r-help@r-project.org Subject: Re: [R] Summing daily values by weekday and weekend Clue: make a column representing the desired

[R] Summing daily values by weekday and weekend

2011-07-21 Thread Hu, Yinghua
(Sorry for reposting. Please delete previous msgs. Thanks!) Hi, all Here I created a data frame like mydates<- seq(as.Date("2010-05-29"), length = 43, by = "day") myvalues<-runif(43,0,1) myframe<-data.frame(dates=mydates, day=weekdays(dates), value=myvalues) dates day valu

[R] Summing values by weekday and weekend

2011-07-21 Thread Hu, Yinghua
Sorry for reposting. The previous message not showing up. Hi, all Here I created a data frame like mydates<- seq(as.Date("2010-05-29"), length = 43, by = "day") myvalues<-runif(43,0,1) myframe<-data.frame(dates=mydates, day=weekdays(dates), value=myvalues) dates day value 1

[R] Summing values by weekday and weekend - based on daily dates

2011-07-21 Thread Hu, Yinghua
Hi, all Here I created a data frame like mydates<- seq(as.Date("2010-05-29"), length = 43, by = "day") myvalues<-runif(43,0,1) myframe<-data.frame(dates=mydates, day=weekdays(dates), value=myvalues) dates day value 1 2010-05-29 Saturday 0.14576143 2 2010-05-30Sunday 0

[R] Summing values by weekday and weekend - based on daily dates

2011-07-21 Thread Hu, Yinghua
Hi, all Here I created a data frame like mydates<- seq(as.Date("2010-05-29"), length = 43, by = "day") myvalues<-runif(43,0,1) myframe<-data.frame(dates=mydates, day=weekdays(dates), value=myvalues) dates day value 1 2010-05-29 Saturday 0.14576143 2 2010-05-30Sunday 0

[R] How to get rid of the index in result file

2011-05-19 Thread Hu, Yinghua
Hi, I am running some function in Ubuntu command line and get some problem. I used some command like below $ R --slave -vanilla < my_infile > my_outfile The return should be one number in the my_outfile. In the my_infile, I call one extra function and it has code like "return x". However, in