[Blotter-commits] r98 - in pkg: demo man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 12 18:48:40 CEST 2009
Author: jryan
Date: 2009-10-12 18:48:39 +0200 (Mon, 12 Oct 2009)
New Revision: 98
Modified:
pkg/demo/longtrend.R
pkg/man/blotter-package.Rd
Log:
- fixed download symbols to have POSIXct indexing, like the
portfolio object
Modified: pkg/demo/longtrend.R
===================================================================
--- pkg/demo/longtrend.R 2009-08-11 15:49:52 UTC (rev 97)
+++ pkg/demo/longtrend.R 2009-10-12 16:48:39 UTC (rev 98)
@@ -53,7 +53,7 @@
# Load data with quantmod
print("Loading data")
-getSymbols('^GSPC', src='yahoo', from='1998-01-01')
+getSymbols('^GSPC', src='yahoo', index.class=c("POSIXt","POSIXct"),from='1998-01-01')
GSPC=to.monthly(GSPC, indexAt='endof')
# Set up indicators with TTR
@@ -114,4 +114,4 @@
#
# $Id: $
#
-###############################################################################
\ No newline at end of file
+###############################################################################
Modified: pkg/man/blotter-package.Rd
===================================================================
--- pkg/man/blotter-package.Rd 2009-08-11 15:49:52 UTC (rev 97)
+++ pkg/man/blotter-package.Rd 2009-10-12 16:48:39 UTC (rev 98)
@@ -50,7 +50,7 @@
# Download price data
symbols = c("IBM","F","MMM")
require(quantmod)
-getSymbols(symbols, from='2007-01-01', to='2007-01-31')
+getSymbols(symbols, from='2007-01-01', to='2007-01-31', index.class="POSIXct")
# Initialize a portfolio object 'p'
print('Creating portfolio \"p\"...')
More information about the Blotter-commits
mailing list