Skip to content
Prev 365740 / 398502 Next

about data manipulation

Not enough information.
If I try this

df <- read.table(text="year   month   flow
2006     3        3.5
2006     4        3.8
2006     5        21
2006     6        32
2007     3        4.1
2007     4        4.4
", header=TRUE)

df

aggregate(flow~year, data=df, sum)

I get a correct answer. So you are likely doing something weird and not showing us all.
Plan text mail. Has been asked many, many times before.


Berend Hasselman
Message-ID: <B6582A6B-D36C-42BC-AC86-160B144C7243@xs4all.nl>
In-Reply-To: <CAN5afy9=90=Fv_x=_pUO5=QS=7q4tYFdYO+gnj7Wh3C5nHkFdA@mail.gmail.com>