[R] Simple averaging question

2010-01-07 Thread lse1986
I have the following data: http://i.imagehost.org/0650/Untitled2.jpg How would i average, say the 5th and the 8th entries? Thanks in advance -- View this message in context: http://n4.nabble.com/Simple-averaging-question-tp1009086p1009086.html Sent from the R help mailing list archive at

Re: [R] Simple averaging question

2010-01-07 Thread Ista Zahn
Assuming the data frame is named X: mean(X[c(5,8), Time]) See ?'[' for details. -Ista On Thu, Jan 7, 2010 at 1:20 PM, lse1986 sam_eden1...@yahoo.co.uk wrote: I have the following data: http://i.imagehost.org/0650/Untitled2.jpg How would i average, say the 5th and the 8th entries? Thanks

[R] simple averaging question?

2007-11-01 Thread Jeff Miller
Hi all, Suppose I have a column vector of 600 measurements taken in 1s intervals. What I want is a new vector with the averages for each min (so there would be 10 entries). Is there an efficient way to do this? I’ve been doing it with a ‘for’ loop but something tells me there is a

Re: [R] simple averaging question?

2007-11-01 Thread Chuck Cleland
Jeff Miller wrote: Hi all, Suppose I have a column vector of 600 measurements taken in 1s intervals. What I want is a new vector with the averages for each min (so there would be 10 entries). Is there an efficient way to do this? I’ve been doing it with a ‘for’ loop but something tells

Re: [R] simple averaging question?

2007-11-01 Thread Jeff Miller
Moshe, Ted, Chuck, All THREE approaches worked fine for me. Thank you! Sincerely, Jeff Miller Internal Virus Database is out-of-date. Checked by AVG Free Edition. 3:09 PM ---BeginMessage--- Jeff Miller wrote: Hi all, Suppose I have a column vector of 600 measurements