1 AM, Doran, Harold wrote:
> ?round
>
>
> From: lily li [mailto:chocol...@gmail.com]
> Sent: Tuesday, May 09, 2017 11:10 AM
> To: Charles Determan
> Cc: Doran, Harold ; R mailing list
> Subject: Re: [R] About calculating average values from several matrices
>
> Than
t; *From:* lily li [mailto:chocol...@gmail.com]
> *Sent:* Tuesday, May 09, 2017 11:13 AM
> *To:* Doran, Harold
> *Cc:* Charles Determan ; R mailing list <
> r-help@r-project.org>
>
> *Subject:* Re: [R] About calculating average values from several matrices
>
>
>
gmail.com>]
Sent: Tuesday, May 09, 2017 11:10 AM
To: Charles Determan mailto:cdeterma...@gmail.com>>
Cc: Doran, Harold mailto:hdo...@air.org>>; R mailing list
mailto:r-help@r-project.org>>
Subject: Re: [R] About calculating average values from several matrices
Thanks very mu
o:* Charles Determan
> *Cc:* Doran, Harold ; R mailing list >
> *Subject:* Re: [R] About calculating average values from several matrices
>
>
>
> Thanks very much, it works. But how to round the values to have only 1
> decimal digit or 2 decimal digits? I think by divid
?round
From: lily li [mailto:chocol...@gmail.com]
Sent: Tuesday, May 09, 2017 11:10 AM
To: Charles Determan
Cc: Doran, Harold ; R mailing list
Subject: Re: [R] About calculating average values from several matrices
Thanks very much, it works. But how to round the values to have only 1 decimal
t;> >
>>> >
>>> >
>>> > ### mean over all cells
>>> >
>>> > sapply(myData, function(x) mean(x))
>>> >
>>> >
>>> >
>>> > ### mean over all columns
>>> >
>>> &
; >
>> >
>> > ### mean over all cells
>> >
>> > sapply(myData, function(x) mean(x))
>> >
>> >
>> >
>> > ### mean over all columns
>> >
>> > sapply(myData, function(x) colMeans(x))
>> >
>> >
on(x) mean(x))
> >
> >
> >
> > ### mean over all columns
> >
> > sapply(myData, function(x) colMeans(x))
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > *From:* lily li [mailto:chocol
to:chocol...@gmail.com]
> *Sent:* Tuesday, May 09, 2017 10:44 AM
> *To:* Doran, Harold
> *Cc:* R mailing list
> *Subject:* Re: [R] About calculating average values from several matrices
>
>
>
> I'm trying to get a new dataframe or whatever to call, which has the same
orm(100), 10, 10)
}
### mean over all cells
sapply(myData, function(x) mean(x))
### mean over all columns
sapply(myData, function(x) colMeans(x))
From: lily li [mailto:chocol...@gmail.com]
Sent: Tuesday, May 09, 2017 10:44 AM
To: Doran, Harold
Cc: R mailing list
Subject: Re: [R] About cal
I'm trying to get a new dataframe or whatever to call, which has the same
structure with each file as listed above. For each cell in the new
dataframe or the new file, it is the average value from former dataframes
at the same location. Thanks.
On Tue, May 9, 2017 at 8:41 AM, Doran, Harold wrote:
Are you trying to take the mean over all cells, or over rows/columns within
each dataframe. Also, are these different dataframes stored within a list or
are they standalone?
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of lily li
Sent: Tuesday, May 09
12 matches
Mail list logo