.7 22.40678
#6 21.86207 21.3
#7 20.81034 17.25000
#8 21.5 21.45763
#9 22.18966 19.7
#10 22.31579 20.58929
A.K.
From: Ye Lin
To: arun
Sent: Wednesday, April 10, 2013 6:02 PM
Subject: Re: [R] how to calculate average of each column
Hey A.
: arun
Cc: R help
Sent: Wednesday, April 10, 2013 4:50 PM
Subject: Re: [R] how to calculate average of each column
Thanks so much! it works fine!
But when I convert the result to a data frame, it mess up.
so i have:
res <- data.frame(res)
then i get:
X1 X2 X3
That is very helpful Rui, thanks so much!
On Wed, Apr 10, 2013 at 1:54 PM, Rui Barradas wrote:
> Hello,
>
> You should provide us with a data example, like the posting guide asks you
> to.
> Without one, you could adapt the following example to your case
>
>
> # Make up some data
> dat <- data.
Hello,
You should provide us with a data example, like the posting guide asks
you to.
Without one, you could adapt the following example to your case
# Make up some data
dat <- data.frame(X = rnorm(200), Y = rnorm(200))
# Divide into subsets of 60 rows each and compute the col means
grp <- r
7 18.8 19.9 18.85000 20.46667
> # V9 V10
> #17.81667 18.51667
>
> A.K.
>
>
>
> - Original Message -----
> From: Ye Lin
> To: r-help@r-project.org
> Cc:
> Sent: Wednesday, April 10, 2013 1:46 PM
> Subject: [R] how to calculate average
.26667 18.8 19.9 18.85000 20.46667
# V9 V10
#17.81667 18.51667
A.K.
- Original Message -
From: Ye Lin
To: r-help@r-project.org
Cc:
Sent: Wednesday, April 10, 2013 1:46 PM
Subject: [R] how to calculate average of each column
Hey All,
I have a large dataset and I w
Hey All,
I have a large dataset and I want to calculate the average of each column
then return a new dataset.
Here is my question: I dont know if there is a function that can allow me
to calculate the average every 60 records of data in the whole dataset, and
return a new data frame. Not sure if
7 matches
Mail list logo