Robert Castelo wrote:
> hi,
>
> thanks to all the replies, i think the discussion can be followed
> throughout this message.
>
>
>> You are returning an result in a function that returns void: the compiler
>> will complain at you.
>>
>
> apologies, indeed it should have been
>
> SEXP f(SEX
hi,
thanks to all the replies, i think the discussion can be followed
throughout this message.
> You are returning an result in a function that returns void: the compiler
> will complain at you.
apologies, indeed it should have been
SEXP f(SEXP list, SEXP element);
> If you study the R Intern
On Thu, 18 Oct 2007, Robert Castelo wrote:
> dear people,
>
> i need to code a function in C working in R and receives two R SEXP
> objects as parameters, where one is a list and another is a vector of
> integers:
>
> void f(SEXP list, SEXP vector) {
>
> ...
>
> return list;
> }
You are returni
This sounds like it could be dangerous, but if you're sure it's
necessary and you know what you are doing, you could investigate whether
the "pairlist" internal structure might enable you to do this (AFAIK, a
"pairlist" is a traditional linked-list data structure). In general,
pairlists seem t
Hi.
I believe it is virtually impossible, maybe even not virtually: if you
manage to do so somehow, please report it as a bug because such things
must be impossible as they break the integrity of R and data.
Forget about changing size in place: it is C and 'realloc' would be
about the only way to
dear people,
i need to code a function in C working in R and receives two R SEXP
objects as parameters, where one is a list and another is a vector of
integers:
void f(SEXP list, SEXP vector) {
...
return list;
}
and it should return the given list with the integer vector concatenated
at