From gchappi at gmail.com  Tue Apr 25 18:08:14 2006
From: gchappi at gmail.com (Hans-Peter)
Date: Tue, 25 Apr 2006 18:08:14 +0200
Subject: [Rd] protection needed?
Message-ID: <47fce0650604250908g2957a123h9d9c80d0a73973c5@mail.gmail.com>

Dear list,

I am unsure if I really need to protect a coerced object if I
immediately access its value and don't access the object anymore. I
tried to find out by looking into the R sources but didn't find
something similar.

It's about the variable _skipLines in the call "function ReadXls(
_file, _sheet, _type, _header, _colHeader, _skipLines: pSExp ): pSExp;
cdecl;".

I did:
    skipLines:= riInteger( riCoerceVector( _skipLines, setIntSxp ) )[0];

but am unsure if I would have to something along:
    skipInt:= riProtect( riCoerceVector( _skipLines, setIntSxp ) );
    skipLines:= riInteger( skipInt )[0];
    riUnprotect( 1 );

According to the manual the second is probably more appropriate but as
I found some places in the R sources where no protection was made, I
decided to ask. Thanks a lot !

--
Regards,
Hans-Peter



[Rd] protection needed?
Hans-Peter