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 number of rows for each week which do contain data (without NA). In the next step I want to create a graph which shows the week on the x-axis and the counted number of data for each week on the y-axis. Thank you! -- View this message in context: http://r.789695.n4.nabble.com/count-data-without-NA-in-certain-time-intervals-and-plot-it-tp4633611p4633635.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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.