[R] Re:Time-Series
Vito Ricci
vito_ricci at yahoo.com
Thu Jan 13 13:54:43 CET 2005
Hi,
you can address to a single ts in a multivariate ts
object by namets[,index]. See this example:
> dati
X Y
1 100 200
2 150 210
3 180 220
4 200 230
5 220 250
> serie<-ts(dati,start=1999)
> serie
Time Series:
Start = 1999
End = 2003
Frequency = 1
X Y
1999 100 200
2000 150 210
2001 180 220
2002 200 230
2003 220 250
> serie[,1] ## first ts
Time Series:
Start = 1999
End = 2003
Frequency = 1
[1] 100 150 180 200 220
> serie[,2] ## second ts
Time Series:
Start = 1999
End = 2003
Frequency = 1
[1] 200 210 220 230 250
Regards
Vito
you wrote:
In a dataframe you call one of the variable (or the
column) connecting the
name of the column to the dataframe name by means of
the $ sign:
so z$energy is the column named energy in the
dataframe z.
I don't know how to do the same with a multi-variable
time-series. I tried
both z.energy, z$energy to no avail.
What's the right synthax?
Ciao
Vittorio
=====
Diventare costruttori di soluzioni
Became solutions' constructors
"The business of the statistician is to catalyze
the scientific learning process."
George E. P. Box
Top 10 reasons to become a Statistician
1. Deviation is considered normal
2. We feel complete and sufficient
3. We are 'mean' lovers
4. Statisticians do it discretely and continuously
5. We are right 95% of the time
6. We can legally comment on someone's posterior distribution
7. We may not be normal, but we are transformable
8. We never have to say we are certain
9. We are honestly significantly different
10. No one wants our jobs
Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese http://www.modugno.it/archivio/palese/
More information about the R-help
mailing list