[R] building time series/zoo/its from a data frame

Erin Hodgess erinm.hodgess at gmail.com
Wed Jun 2 17:37:01 CEST 2010


Dear R People:

I have the following data frame:

> x.df
       date        cond freq
1  04/01/09       Fever   12
2  04/02/09       Fever   11
3  04/03/09       Fever   10
4  04/04/09       Fever   13
5  04/05/09       Fever    6
6  04/01/09        Rash    6
7  04/02/09        Rash   10
8  04/03/09        Rash    9
9  04/04/09        Rash   10
10 04/05/09        Rash    8
11 04/01/09 Respiratory   12
12 04/02/09 Respiratory    9
13 04/03/09 Respiratory    6
14 04/04/09 Respiratory   11
15 04/05/09 Respiratory   11
>

I would like to generate 3 time series (or zoo objects or its); one
for Fever, one for Rash, and one for Respiratory.   There are 2
questions here, please:
a. How do I generate the series, please?
b. Which is best, time series, zoo objects, or its objects, please?

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com



More information about the R-help mailing list