Re: [R] count data without NA in certain time intervals and plot it

2012-06-17 Thread arun
Week",ylab="Count") A.K. - Original Message - From: Tagmarie To: r-help@r-project.org Cc: Sent: Sunday, June 17, 2012 5:40 AM Subject: Re: [R] count data without NA in certain time intervals and plot it Thank you Arun for your time! Your idea is maybe only the first step to w

Re: [R] count data without NA in certain time intervals and plot it

2012-06-17 Thread Tagmarie
Great! That works! Thank you Rui! I would have spent days (which I don't have left before handing my report in) getting there by myself! Have a great rest-weekend! -- View this message in context: http://r.789695.n4.nabble.com/count-data-without-NA-in-certain-time-intervals-and-plot-it-tp46336

Re: [R] count data without NA in certain time intervals and plot it

2012-06-17 Thread Rui Barradas
Hello, I've seen your reply to arun's reply and gave it a try. Since arun's code included more than one column, I've added another in one of the examples. # Example 1 dattrial1 <- data.frame(a=c(1,NA,rnorm(4,10)), Week=c(3,3,3,4,4,4)) d1 <- split(dattrial1, dattrial1$Week) count <- sapply(d1,

Re: [R] count data without NA in certain time intervals and plot it

2012-06-17 Thread Tagmarie
Thank you Arun for your time! Your idea is maybe only the first step to what I want but it was nevertheless a new tool for me and interessing to learn. I added a "week"-column to your data set: dattrial<-data.frame(a=c(1,NA,rnorm(4,10)), Week=c(3,3,3,4,4,4)) I am looking for a way to count the

Re: [R] count data without NA in certain time intervals and plot it

2012-06-16 Thread arun
To: r-help@r-project.org Cc: Sent: Saturday, June 16, 2012 4:11 PM Subject: [R] count data without NA in certain time intervals and plot it Hello, I'm quite new to R and still spend hours trying to figure out single things so I hope nobody rolls his eyes over my question. I have a data

[R] count data without NA in certain time intervals and plot it

2012-06-16 Thread Tagmarie
Hello, I'm quite new to R and still spend hours trying to figure out single things so I hope nobody rolls his eyes over my question. I have a data set over time and converted it to the POSTIXct format. I added a column in the data set for the week and the month. I try to get a plot which shows