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
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
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,
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
Hi,
Not quite understand the question.
Do you want to select only certain columns or rows without NAs?
Suppose, I have a dataset such as the one below:
dattrial<-data.frame(a=c(1,NA,rnorm(4,10)),b=c(NA,NA,NA,3,4,6),c=c(sample(LETTERS[1:3],replace=TRUE),
sample(LETTERS[3:5],3,replace=TRUE)),d
5 matches
Mail list logo