[Rd] Using a C++ library to read a binary file

Demitri Muna thatsanicehatyouhave at mac.com
Wed May 25 02:38:20 CEST 2005


Hello,

I am trying to use a C++ library I have to read some data into R.  
I've gone over the "Writing R Extensions" page and some of the  
archives, but am left somewhat confused (and I'm still very new to R!).

What I want to do is fairly simple. Given some parameters, I'd like  
to read a string of numbers from a proprietary binary file into an  
array. I have a C++ library that will read anything I need from this  
file.

What is the best way to do this? Can someone give me any pointers to  
sample code?

One possibility I've considered is writing a small unix command line  
program that, given the parameters, will return the string of  
numbers. Is there a way to "capture" this from R into an array?

Cheers,

Demitri



More information about the R-devel mailing list