[Rcpp-devel] data.frame from R to C++?

deqiang sun deqiangs at bcm.edu
Fri Apr 8 07:27:49 CEST 2011


Hi all,

Suppose I want to read a csv file including TEXT and NUMBER fields in R by function read.table. 
Is there a way to use the result in C++? Like the way I use in R, say, 2nd column is x[,2], 3rd row is x[3,].
I have gone through the examples in RInside and did not find anything helpful.

PS: Usually when I read a csv into C++ I would do splitting myself line by line and if I want to do operations between columns I need to write addition data structures. 

Thanks,
Dsun





More information about the Rcpp-devel mailing list