Re: [R] Summary of data for each year

2013-02-01 Thread Felipe Carrillo
, January 31, 2013 11:52 PM Subject: Re: [R] Summary of data for each year Hello, One possibility is: creek - read.csv(creek.csv) colnames(creek) - c(date,flow) creek$date - as.Date(creek$date, %m/%d/%Y) creek - within(creek, year - format(date, '%Y')) with(creek, aggregate(flow, by=list

Re: [R] Summary of data for each year

2013-02-01 Thread arun
janesh.devk...@gmail.com To: r-help@r-project.org Cc: Sent: Friday, February 1, 2013 2:32 AM Subject: [R] Summary of data for each year Hello All, I have a data with two columns. In one column it is date and in another column it is flow data. I was able to read the data as date and flow data. I

[R] Summary of data for each year

2013-01-31 Thread Janesh Devkota
Hello All, I have a data with two columns. In one column it is date and in another column it is flow data. I was able to read the data as date and flow data. I used the following code: creek - read.csv(creek.csv) library(ggplot2) creek[1:10,] colnames(creek) - c(date,flow) creek$date -

Re: [R] Summary of data for each year

2013-01-31 Thread Pascal Oettli
Hello, One possibility is: creek - read.csv(creek.csv) colnames(creek) - c(date,flow) creek$date - as.Date(creek$date, %m/%d/%Y) creek - within(creek, year - format(date, '%Y')) with(creek, aggregate(flow, by=list(year=year), summary)) HTH, Pascal Le 01/02/2013 16:32, Janesh Devkota a