Doran, Harold <hdo...@air.org> wrote:
> ?round
>
>
> From: lily li [mailto:chocol...@gmail.com]
> Sent: Tuesday, May 09, 2017 11:10 AM
> To: Charles Determan <cdeterma...@gmail.com>
> Cc: Doran, Harold <hdo...@air.org>; R mailing list <r-help@r-project.
as expected
>
>
>
> *From:* lily li [mailto:chocol...@gmail.com]
> *Sent:* Tuesday, May 09, 2017 11:13 AM
> *To:* Doran, Harold <hdo...@air.org>
> *Cc:* Charles Determan <cdeterma...@gmail.com>; R mailing list <
> r-help@r-project.org>
>
> *Subject:* Re
l.com>; R mailing list
<r-help@r-project.org>
Subject: Re: [R] About calculating average values from several matrices
Yes, that means to control decimal numbers. For example, use round(2.3122,
digits=1), it gets 2.3
On Tue, May 9, 2017 at 9:11 AM, Doran, Harold
<hdo...@air.org<mailt
2017 11:10 AM
> *To:* Charles Determan <cdeterma...@gmail.com>
> *Cc:* Doran, Harold <hdo...@air.org>; R mailing list <r-help@r-project.org
> >
> *Subject:* Re: [R] About calculating average values from several matrices
>
>
>
> Thanks very much, it works. But ho
?round
From: lily li [mailto:chocol...@gmail.com]
Sent: Tuesday, May 09, 2017 11:10 AM
To: Charles Determan <cdeterma...@gmail.com>
Cc: Doran, Harold <hdo...@air.org>; R mailing list <r-help@r-project.org>
Subject: Re: [R] About calculating average values from several matrices
<- matrix(rnorm(100), 10, 10)
>>> >
>>> > }
>>> >
>>> >
>>> >
>>> > ### mean over all cells
>>> >
>>> > sapply(myData, function(x) mean(x))
>>> >
>>> >
>&g
>> > 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. Th
t; > ### mean over all cells
> >
> > sapply(myData, function(x) mean(x))
> >
> >
> >
> > ### mean over all columns
> >
> > sapply(myData, function(x) colMeans(x))
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
&
lily li [mailto:chocol...@gmail.com]
> *Sent:* Tuesday, May 09, 2017 10:44 AM
> *To:* Doran, Harold <hdo...@air.org>
> *Cc:* R mailing list <r-help@r-project.org>
> *Subject:* Re: [R] About calculating average values from several matrices
>
>
>
> I'm trying to
<r-help@r-project.org>
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
structure with each file as listed above. For each cell in the new dataframe or
the new file, it is the average value from f
un...@r-project.org] On Behalf Of lily li
> Sent: Tuesday, May 09, 2017 10:39 AM
> To: R mailing list <r-help@r-project.org>
> Subject: [R] About calculating average values from several matrices
>
> Hi R users,
>
> I have a question about manipulating the data.
> For ex
09, 2017 10:39 AM
To: R mailing list <r-help@r-project.org>
Subject: [R] About calculating average values from several matrices
Hi R users,
I have a question about manipulating the data.
For example, there are several such data frames or matrices, and I want to
calculate the average value fr
Hi R users,
I have a question about manipulating the data.
For example, there are several such data frames or matrices, and I want to
calculate the average value from all the data frames or matrices. How to do
it? Also, should I convert them to data frame or matrix first? Right now,
when I use
13 matches
Mail list logo