[R] Sending lists from R to C using .C

2012-04-14 Thread chris90nz
Hi, I am currently stuck on the following problem: I have a matrix where each element is a list of numbers of differing lengths. I am wondering what would be the best way to send this to my C function using .C? Cheers, Chris -- View this message in context: http://r.789695.n4.nabble.com/Sendi

Re: [R] Dealing with NAs in C

2012-02-25 Thread chris90nz
Thanks Rui, that was exactly what I was looking for! Have successfully implemented it and got rid of yet another loop! Cheers, Chris -- View this message in context: http://r.789695.n4.nabble.com/Dealing-with-NAs-in-C-tp4421377p4421532.html Sent from the R help mailing list archive at Nabble.co

[R] Dealing with NAs in C

2012-02-25 Thread chris90nz
Hi. I am currently converting a lot of R code to C in order to make it more efficient. A lot of the data involves NAs. As the data is mainly integers > 0, I am just setting all NAs to 0 then sending it to the C code then resetting them to NAs again after the C program is done, to be compatible with