Re: [R] How to extract Friday data from daily data.

2010-11-09 Thread Gabor Grothendieck
On Tue, Nov 9, 2010 at 11:23 AM, thornbird wrote: > > Thanks for your suggestion. I received a few error messages. Can anyone help > me figure out why I get the following error messages and how to solve them > by revising my code? The data is shown in the post above. Thanks. > > >> library(zoo) >>

Re: [R] How to extract Friday data from daily data.

2010-11-09 Thread thornbird
Thanks for your suggestion. I received a few error messages. Can anyone help me figure out why I get the following error messages and how to solve them by revising my code? The data is shown in the post above. Thanks. > library(zoo) > > colClasses <- c("character", "character", "numeric", "chara

Re: [R] How to extract Friday data from daily data.

2010-11-09 Thread Marianne Promberger
thornbird 05-Nov-10 20:10: > > Thank you very much. It worked great with the testdata. I have one more > questionto to ask. As my data is incomplete, sometimes Thu is also missing, > then I have no other options but to pick Sat instead, and if Sat is also > missing, then my best possible option i

Re: [R] How to extract Friday data from daily data.

2010-11-08 Thread thornbird
I did the following but it shows a couple of error messages. Could you help me with that? Thanks in advance. > testdata <- read.csv("C:\\Users\\Kevin\\Desktop\\testdata.csv", > header=TRUE) > testdata date day time webpage item value 1 10-Jun-09 Wed 9:40:53 MattDamon fan

Re: [R] How to extract Friday data from daily data.

2010-11-07 Thread thornbird
Hi thanks for quick reply. I am new to using R and still tried to figure out how to use Zoo package. Here is the code I have so far: library(zoo) colClasses <- c("NULL", "character", "character", "numeric", "character", "character", "NULL") col.names <- c(NA, "webpage", "item", "value", "day",

Re: [R] How to extract Friday data from daily data.

2010-11-07 Thread thornbird
Hi thanks for quick reply. I am new to using R and still tried to figure out how to use Zoo package. Here is the code I have so far: library(zoo) colClasses <- c("NULL", "character", "character", "numeric", "character", "character", "NULL") col.names <- c(NA, "webpage", "item", "value", "day

Re: [R] How to extract Friday data from daily data.

2010-11-07 Thread Gabor Grothendieck
On Sat, Nov 6, 2010 at 11:05 PM, thornbird wrote: > > Thank you very much. I learned a lot through your help. It worked great for > the sample data. But when I try to apply the command to my dataset, I ran > into two more problems. > > First, the dataset is huge, it has thousands of lines. I can r

Re: [R] How to extract Friday data from daily data.

2010-11-07 Thread thornbird
Thank you very much. I learned a lot through your help. It worked great for the sample data. But when I try to apply the command to my dataset, I ran into two more problems. First, the dataset is huge, it has thousands of lines. I can read it in R. Using Lines <- " data " may not work such a

Re: [R] How to extract Friday data from daily data.

2010-11-05 Thread Gabor Grothendieck
On Fri, Nov 5, 2010 at 8:24 PM, Gabor Grothendieck wrote: > On Fri, Nov 5, 2010 at 1:22 PM, thornbird wrote: >> >> I am new to Using R for data analysis. I have an incomplete time series >> dataset that is in daily format. I want to extract only Friday data from it. >> However, there are two prob

Re: [R] How to extract Friday data from daily data.

2010-11-05 Thread Gabor Grothendieck
On Fri, Nov 5, 2010 at 1:22 PM, thornbird wrote: > > I am new to Using R for data analysis. I have an incomplete time series > dataset that is in daily format. I want to extract only Friday data from it. > However, there are two problems with it. > > First, if Friday data is missing in that week,

Re: [R] How to extract Friday data from daily data.

2010-11-05 Thread thornbird
Thank you very much. It worked great with the testdata. I have one more questionto to ask. As my data is incomplete, sometimes Thu is also missing, then I have no other options but to pick Sat instead, and if Sat is also missing, then my best possible option is to pick Wed, and etc. Bascially I ha

Re: [R] How to extract Friday data from daily data.

2010-11-05 Thread Adrienne Wootten
Hey, This should work, but after you read in your data make sure that your day, date and time are separate, this should work just fine, or something like it. > testdata views number timestamp day date time 1 views 910401 1246192687 Sun 6/28/2009 12:38 2 views 921537 124627891

[R] How to extract Friday data from daily data.

2010-11-05 Thread thornbird
I am new to Using R for data analysis. I have an incomplete time series dataset that is in daily format. I want to extract only Friday data from it. However, there are two problems with it. First, if Friday data is missing in that week, I need to extract the data of the day prior to that Friday