[R] how to calculate growth rate of a variable

Albyn Jones jones at reed.edu
Fri Jul 24 18:24:20 CEST 2009


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 wrote:
> 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 0 -39.20 145.22 4270 353.950
> 1991.476747 1991 6 24 0 18 0 -39.43 145.28 4270 353.510
> -----------------------------------------------
> 2000.740788 2000 9 28 3 5 0 -38.00 145.00 2280 366.750
> 2000.740794 2000 9 28 3 8 0 -38.00 145.00 1830 366.550
> 2000.740803 2000 9 28 3 13 0 -38.00 145.00 1220 370.550
> 
> -- 
> Yogesh K. Tiwari (Dr.rer.nat),
> Scientist,
> Indian Institute of Tropical Meteorology,
> Homi Bhabha Road,
> Pashan,
> Pune-411008
> INDIA
> 
> Phone: 0091-99 2273 9513 (Cell)
>         : 0091-20-25904350 (O)
> Fax    : 0091-20-258 93 825
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>




More information about the R-help mailing list