Re: [R] how to calculate growth rate of a variable

2009-07-24 Thread Albyn Jones
Your data will have all sorts of patterns (diurnal, seasonal) in addition to long term trend. I'd start by smoothing out the cyclic patterns with loess or gam, then use a secant approximation to the slope on the smoothed series. albyn On Fri, Jul 24, 2009 at 06:13:00PM +0530, Yogesh Tiwari wro

[R] how to calculate growth rate of a variable

2009-07-24 Thread Yogesh Tiwari
Dear R Users, If a variable, say CO2(ppm), is varying with time. Then how to calculate CO2 (ppm) growth rate /a-1 I have CO2 time series (1991-2000), as: time, year, month, day, hour, min, sec, lat, long, height, CO2 1991.476722 1991 6 24 0 5 0 -38.93 145.15 4270 353.680 1991.476741 1991 6 24 0 15