search for: avgmat

Displaying 2 results from an estimated 2 matches for "avgmat".

Did you mean: amat
2007 Jun 07
1
Averaging across rows & columns
...need to average to get one reading per fruit; each row is a point in the light spectrum and I need to calculate an average reading every 5nm -14 rows- for each fruit). Someone proposed to another user who wanted an avg across columns to do a <- matrix(rnorm(360),nr=10) b <- rep(1:12,each=3) avgmat <- aggregate(a,by=list(b)) I tried doing this to get started with the columns first but it asks for an argument FUN that has no default. The help for aggregate isn't helping me much (a new R user) to discover what value to give to FUN -'average' doesn't seem to exist, and '...
2006 Mar 06
4
Averaging over columns
Hi I've been reading the help for by and aggregate but can't get my head round how to do this. I have a data frame - the first three columns are replicate measurements, then the next 3 are replicates etc up to 36 (so 12 variables with 3 replicate measurements each). I want to compute the mean for each of the 12 variables, so that, for each row, I have 12 means. A grouping variable