[R] zoo: variable gets modified at making zoo object

Agustin Lobo Agustin.Lobo at ictja.csic.es
Mon May 28 11:35:11 CEST 2012


I'm doing:

> alyL32007z <- zoo(alyL32007,alyL32007$time)
> range(time(alyL32007z))
[1] "2007-01-01 00:00:00 UTC" "2007-12-31 23:30:00 UTC"

But then, while the original variable is:
> summary(alyL32007$NEE_st)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
-15.340  -1.615  -0.054  -0.814   0.750   8.965   11124

the variable within the zoo object is different:
> summary(alyL32007z$NEE_st)
     Index                     alyL32007z$NEE_st
 Min.   :2007-01-01 00:00:00     0.335:    7
 1st Qu.:2007-04-02 05:52:30     0.582:    7
 Median :2007-07-02 11:45:00     0.611:    7
 Mean   :2007-07-02 11:45:00     0.063:    6
 3rd Qu.:2007-10-01 17:37:30     0.069:    6
 Max.   :2007-12-31 23:30:00   (Other): 6363
                               NA's   :11124

and I  get an error at plotting:
> plot(alyL32007z$NEE_st)
Error in plot.window(...) : invalid 'ylim' value

Any help appreciated,

Thanks
Agus
--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
e-mail Agustin.Lobo at ictja.csic.es
https://sites.google.com/site/aloboaleu/



More information about the R-help mailing list