Re: [R] xts error: number of items to replace is not a multiple of replacement length

2014-01-18 Thread Joshua Ulrich
ects). Best, -- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com On Thu, Jan 16, 2014 at 7:53 PM, ce wrote: > Indeed it works ! Thanks a lot. But why? > > > -Original Message- > From: "arun" [smartpink...@yahoo.com] > Dat

Re: [R] xts error: number of items to replace is not a multiple of replacement length

2014-01-16 Thread ce
Indeed it works ! Thanks a lot. But why? -Original Message- From: "arun" [smartpink...@yahoo.com] Date: 01/16/2014 08:44 PM To: "r-help@r-project.org" Subject: Re: [R] xts error: number of items to replace is not a multiple of replacement length Hi, Try: sa

Re: [R] xts error: number of items to replace is not a multiple of replacement length

2014-01-16 Thread arun
Hi, Try: sample.xts["2007-01-02::2007-01-04","Close"] <-sample.xts["2007-01-02::2007-01-04","Close"] +1 sample.xts["2007-01-02::2007-01-04"] #   Open High  Low    Close #2007-01-02 50.03978 50.11778 49.95041 52.11778 #2007-01-03 50.23050 50.42188 50.23050 52.39767 #2007-01-0

[R] xts error: number of items to replace is not a multiple of replacement length

2014-01-16 Thread ce
Dear all , I am getting this error while trying to change columns of an xts object with a date range as index. > library(xts) Loading required package: zoo Attaching package: ‘zoo’ The following object is masked from ‘package:base’: as.Date, as.Date.numeric > data(sample_matrix)