From saptarshi.guha at gmail.com  Sun May 10 17:49:24 2009
From: saptarshi.guha at gmail.com (Saptarshi Guha)
Date: Sun, 10 May 2009 11:49:24 -0400
Subject: [Rd] In C, a fast way to slice a vector?
Message-ID: <1e7471d50905100849w75e5d388p2413e8c18b3821bd@mail.gmail.com>

Hello,
Suppose in the following code,
PROTECT(sr = R_tryEval( .... ))

sr is a RAWSXP vector. I wish to return another RAWSXP starting at
position 13 onwards (base=0).

I could create another RAWSXP of the correct length and then memcpy
the required bytes and length to this new one.

However is there a more efficient method?

Regards
Saptarshi Guha



[Rd] In C, a fast way to slice a vector?
Saptarshi Guha