Dear Rcpp-Experts,
how can I get the equivalent of the R expression
my.df <- data.frame( …, stringsAsFactors=FALSE )
in Rcpp?
I have this code in Rcpp:
…
return( DataFrame::create(
Named( "acc" ) = accsCol,
Named( "ec" ) = ecCol,
Named( "prot.acc" ) = protCol,
Named( "term_type" ) = termTypeCol
) );
Calling the above from R, I realize, that the returned DataFrame's
columns are factors and not character-vectors, as I need them to be.
How to achieve this?
Should I just convert them in R itself, like in the following example?
for ( i in 1:ncol(my.df) ) {
my.df[,i] <- as.character( my.df[,i] )
}
Or is there a better - and possibly more efficient - way to achieve this?
As always your help will be much appreciated.
Have a pleasant day and
Cheers!
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel