Re: [R] passing a string from .C()

2004-03-02 Thread Prof Brian Ripley
On Mon, 1 Mar 2004, Vadim Ogranovich wrote: Could someone please point to an example of passing strings from .C() calls back to R? There are not many, as such things are better done using .Call. I want to be able to do something like this: str - .C(return_foo_string,

[R] passing a string from .C()

2004-03-01 Thread Vadim Ogranovich
Hi, Could someone please point to an example of passing strings from .C() calls back to R? I want to be able to do something like this: str - .C(return_foo_string, str=character(1))$str void return_foo_string(char ** str) { *str = foo; } The above code has at least two memory