just assign it to an object
x<- DT .
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Sun, Nov 27, 2016 at 2:03 AM, lily li wrote:
> Thanks Jim, this method is very convenient and is what I want. Cou
Thanks Jim, this method is very convenient and is what I want. Could I know
how to save the resulted dataframe? It printed in the console directly.
On Sat, Nov 26, 2016 at 5:55 PM, jim holtman wrote:
> You did not provide any data, but I will take a stab at it using the
> "dplyr" package
>
> lib
Hello Folks,
As a neophyte R user I frequently have questions, and I�m sorry to bother
experienced users with what may appear to be trivial questions to which I
should be able to find answers without help. I�ve searched everywhere I know
to look, and can�t find any reference to this question.
Dear R users,
I am wondering if someone has a script to download and read Merra 2 files.
I really appreciate your help.
Best,
Alemu
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
htt
You did not provide any data, but I will take a stab at it using the
"dplyr" package
library(dplyr)
DT %>%
group_by(month, id, note) %>%
summarise(avg = mean(total))
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you
A reproducible example was not provided, but I think what is wanted is
either ?tapply or ?ave; e.g.
within(DF, means <- ave(total, note, month, FUN = mean))
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka
Hi,
It may help that:
aggregate(DF$total, list(DF$note, DF$id, DF$month), mean)
should give you means broken down by time slice (note), id and month.
You could then subset means for GA or GB from the aggregated dataframe.
Philip
On 27/11/2016 3:11 AM, lily li wrote:
Hi R users,
I'm trying
Hi R users,
I'm trying to manipulate a dataframe and have some difficulties.
The original dataset is like this:
DF
year month total id note
2000 1 98GA 1
2001 1100 GA 1
2002 2 99GA 1
2002 2 80GB 1
...
2012 1
8 matches
Mail list logo