Skip to content

xts / split time series issue

3 messages · Nick Torenvliet, Brian G. Peterson, Jeff Ryan

#
We load historical data (as from CSV files), split() and then xts here.

Alternately, you can likely get a list of unique() symbols in your xts, 
and then loop through them and assign to a variable named for 'symbol', 
with something like

assign('ZUT',table[table$symbol=='ZUT',c('open','high','low','close','volume')])

Cheers,

   - Brian
On 12/13/2010 04:20 PM, Nick Torenvliet wrote:

  
    
#
You can coerce back (assuming the data is coercible) using storage.mode<-

x <- xts(as.character(100), Sys.Date())
x
           [,1]
2010-12-13 "100"

storage.mode(x)
[1] "character"

storage.mode(x) <- "numeric"
storage.mode(x)
[1] "double"

x
           [,1]
2010-12-13  100

HTH
Jeff

On Mon, Dec 13, 2010 at 4:20 PM, Nick Torenvliet
<nick.torenvliet at gmail.com> wrote: