[R-SIG-Finance] subsetting from timeSeries

Cedrick W. Johnson cedrick at cedrickjohnson.com
Tue Apr 6 21:27:59 CEST 2010

Try converting into xts format, the xts vignettes give many examples of subsetting..

Also to.period() may be of help to you


Sent from my BlackBerry®

-----Original Message-----
From: Jeff Hamann <jeff.hamann at moneytree.com>
Date: Tue, 6 Apr 2010 12:25:13 
To: <r-sig-finance at stat.math.ethz.ch>
Subject: [R-SIG-Finance] subsetting from timeSeries

I'm a newbie with timeSeries and I'm trying to subset data from a timeSeries objects (by month, quarter, etc.)

                  ^GSPC          RYJ          NFO           STH          CVY
2007-01-03  0.013961173 -0.009841523  0.024217982 -0.0003857281  0.018018506
2007-02-01 -0.022088306 -0.006062295 -0.003042984 -0.0120319713 -0.006430890
2007-03-01  0.009930484 -0.005543251  0.021854675  0.0143441110  0.003220615
2007-04-02  0.042379836  0.055675009  0.041254253  0.0042250879  0.037859411
2007-05-01  0.032030724  0.043216601  0.044762718  0.0372433489  0.028772691
2007-06-01 -0.017976931  0.000000000 -0.021431861 -0.0077850254 -0.018651593
                   XRO          ONEQ          FBT          FDV          FDN
2007-01-03  0.04083675  0.0179801641  0.024199865  0.024397067  0.048071606
2007-02-01 -0.01103803 -0.0194842469 -0.040227932 -0.007760824 -0.012337957

and I'm kind of a newbie with timeSeries. 

Before I spend a few days hacking out suboptimal solutions, I thought I might ask the group where I might find a decent tutorial on sub-setting timeSeries using only date ranges. 

I have monthly, weekly, and daily datasets and need to grad monthly, weekly, and daily subsets for by month, quarter, etc.

I'm sure this will elicit an RTFM response, but please, pretty please, with sugar on top, be gentle. I'm new here.


Jeff D. Hamann, PhD
2430 NW Professional Drive
Corvallis, Oregon 97330

Full featured flexible financial plans in minutes. 
Simple or advanced. Goal or cash flow. Desktop or online.
Free downloads, videos, & online trials.

	[[alternative HTML version deleted]]

R-SIG-Finance at stat.math.ethz.ch mailing list
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.

More information about the R-SIG-Finance mailing list