Skip to content
Prev 21467 / 63424 Next

send a list from R to C

On Tue, 18 Jul 2006, J?rn Schulz wrote:

            
You intended the second element of the list, so you need

CHAR(STRING_ELT(VECTOR_ELT(headerR, 1), 0)))

that is X[[2]][1], not X[1] (assuming X to be a character vector).

[This is all in `Writing R Extensions', with examples.  The R-devel 
version of R would have given you an informative warning about the misuse 
of SET_VECTOR_ELT.]