Skip to content

Help in subsetting a vector incrementally

2 messages · Raghuraman Ramachandran, James

2 days later
#
On Mon, Jun 25, 2012 at 7:07 AM, Raghuraman Ramachandran
<rramachandran at jefferies.com> wrote:
Raman,

I think it would help if you could provide a bit more information.
For example, some sample data showing the input and expected output.
Additionally, some clarification of whether you are using the Delt
function from quantmod.

For example:
Delt.1.arithmetic
 [1,]                NA
 [2,]          2.000000
 [3,]          1.500000
 [4,]          1.333333
 [5,]          1.250000
 [6,]          1.200000
 [7,]          1.166667
 [8,]          1.142857
 [9,]          1.125000
[10,]          1.111111
Delt.1.arithmetic
 [1,]                NA
 [2,]          2.000000
 [3,]          1.500000
 [4,]          1.333333
 [5,]          1.250000
 [6,]          1.200000
 [7,]          1.166667
 [8,]          1.142857
 [9,]          1.125000

What should the desired output be?


James