Hi
aggregate is another option.
aggregate(df[, 2:4], list(df$Year), sum)
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of
> p...@philipsmith.ca
> Sent: Monday, March 4, 2019 4:15 AM
> To: r-help@r-project.org
> Subject: [R] Tidyverse data frame conversi
summarise_all() does the trick. Thanks very much for the help.
Philip
On 2019-03-03 22:14, p...@philipsmith.ca wrote:
I have a data frame in which the first column is a sequence of monthly
dates and the other columns are variables. There are a great many
variables. I want to create another data
Sent: 04 March 2019 08:45
To: r-help@r-project.org
Subject: [R] Tidyverse data frame conversion from monthly to annual
I have a data frame in which the first column is a sequence of monthly
dates and the other columns are variables. There are a great many
variables. I want to create another data
?summarise_all
See the examples.
On March 3, 2019 7:14:55 PM PST, p...@philipsmith.ca wrote:
>I have a data frame in which the first column is a sequence of monthly
>dates and the other columns are variables. There are a great many
>variables. I want to create another data frame similar to the
I have a data frame in which the first column is a sequence of monthly
dates and the other columns are variables. There are a great many
variables. I want to create another data frame similar to the first one,
but with annual values instead of monthly, created by summing the months
within each
5 matches
Mail list logo