Skip to content
Prev 48543 / 63424 Next

using 2D array of SEXP for creating dataframe

Hi Sandip,
On 06/26/2014 04:21 PM, Sandip Nandi wrote:
I still don't believe it "works". It doesn't even compile. More below...
'listNames' is undeclared (C is case-sensitive).

Let's assume you managed to compile this with an (imaginary)
case-insensitive C compiler, 'listnames' is an array of length
2 and this for loop tries to read the 3 first elements
from it. So you're just lucky that you didn't get a segfault.
In any case, I don't see how this code could produce
the data.frame you're trying to make.

If you want to discuss how to improve code that *works* (i.e.
compiles and produces the expected result), that's fine, but you
should be able to show that code. Otherwise it sounds like you're
asking people to fix your code. Or to write it for you. Maybe
that's fine too but people will be more sympathetic and willing
to help if you're honest about it.

Cheers,
H.