mail.com]
Sent: Wednesday, August 3, 2016 9:21 PM
To: lily li
Cc: PIKAL Petr ; R mailing list
Subject: Re: [R] plot many dfs in ggplot
That Petr already showed. Please read his email again.
lily li mailto:chocol...@gmail.com>> schrieb am Mi., 3.
Aug. 2016 21:09:
Thanks. How to add an a
Hi,
In regards to your first question:
>Hi R users,
>I have a dataframe, with daily precipitation data, is it possible to plot
>annual mean or annual sum values directly? Thanks for your help.
>df
>year month day precip time
>2010 1 10.5 2010-01-01
>2010
That Petr already showed. Please read his email again.
lily li schrieb am Mi., 3. Aug. 2016 21:09:
> Thanks. How to add an additional column, with the name of each dataframe's
> name?
>
> On Wed, Aug 3, 2016 at 1:06 PM, Ulrik Stervbo
> wrote:
>
>> Not quite - this works: rbind(df1, df2, df3, df
Thanks. How to add an additional column, with the name of each dataframe's
name?
On Wed, Aug 3, 2016 at 1:06 PM, Ulrik Stervbo
wrote:
> Not quite - this works: rbind(df1, df2, df3, df1, df2, df3)
>
> Or if the have your data.frames in a list, use do.call:
>
> df.lst <- list(df1, df2, df3, df1, d
Not quite - this works: rbind(df1, df2, df3, df1, df2, df3)
Or if the have your data.frames in a list, use do.call:
df.lst <- list(df1, df2, df3, df1, df2, df3)
do.call(rbind, df.lst)
You might take a look at the facet functionality in ggplot once you are
ready to build your plots.
Best,
Ulrik
Thanks, but rbind/merge function only combines two dataframes each time,
how to work on multiple dataframes? Thanks again.
On Wed, Aug 3, 2016 at 4:20 AM, PIKAL Petr wrote:
> Hi.
>
> Hm. I would add a column indicating data frame and merge/rbind all data
> frames.
>
> Something like
>
> df1$fr
Hi.
Hm. I would add a column indicating data frame and merge/rbind all data frames.
Something like
df1$fr <- 1
df2$fr <- 2
dfkompl <- rbind(df1, df2)
ggplot(dfkompl, aes(x=time, y=varA, colour=factor(fr))
Cheers
Petr
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-proje
Another question is, if I want to shade the range between the maximum and
minimum values for daily or annual values, how to do it? Thanks again.
On Tue, Aug 2, 2016 at 12:50 PM, lily li wrote:
> Hi all,
>
> I have another question. There are several dataframes, each has the same
> columns: time
8 matches
Mail list logo