[Rd] protection needed?

From: Hans-Peter <gchappi_at_gmail.com>
Date: Tue 25 Apr 2006 - 16:08:14 GMT

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;

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 !


R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed Apr 26 02:15:28 2006

This archive was generated by hypermail 2.1.8 : Tue 25 Apr 2006 - 18:17:44 GMT