[Rcpp-devel] Bug with table sugar and NumericVector in Rcpp 0.10.3
luckyrand at gmail.com
Tue Apr 2 20:04:30 CEST 2013
Maybe not. I think a function in library should do only one thing, and for
DataFrame::create it is building a data.frame. If the users wish to convert
string to factor, one should do it explicitly, may with a help function
such as `stringsToFactor` or `as.factor`. stringsAsFactor is an important
feature at R side, but does RCpp have to match the exact interface of R?
For now, RCpp doesn't really support factor. Returning a data.frame with
factor element would make it useless for RCpp.
I'm curious about the difference between the code on SVN and the old one. I
read the code, and understand the new one is using List, while the old one
actually call something like as.data.frame(data.frame(t1, t2, ...)) on R
side. I just don't know why one would work while the other doesn't.
On Tue, Apr 2, 2013 at 10:16 AM, Romain Francois
<romain at r-enthusiasts.com>wrote:
> Le 02/04/13 17:01, Dirk Eddelbuettel a écrit :
>> On 2 April 2013 at 16:36, Romain Francois wrote:
>> | Le 29/03/13 16:37, Dirk Eddelbuettel a écrit :
>> | >
>> | > On 29 March 2013 at 16:20, romain at r-enthusiasts.com wrote:
>> | > | Cool. I'll have a look when I'm back from easter weekend.
>> | >
>> | > Sounds good.
>> | >
>> | > And that point, it would be really nice if you could also restore the
>> | > to build Rcpp, which appears to have broken with your Data.Frame
>> | >
>> | > Details are below.
>> | Should be back up now. With new versions of DataFrame::create that work
>> | better.
>> And it builds, but doesn't pass (all) tests yet:
>> checking tests ...
>> Running ‘doRUnit.R’ [185s/193s]
>> Running the tests in ‘tests/doRUnit.R’ failed.
>> Last 13 lines of output:
>> Executing test function test.wstring_param ... done successfully.
>> Executing test function test.wstring_return ... done successfully.
>> saving txt unit test report to '/home/edd/svn/rcpp/pkg/Rcpp.**
>> saving html unit test report to '/home/edd/svn/rcpp/pkg/Rcpp.**
>> Error in eval(expr, envir, enclos) :
>> unit test problems: 1 failures, 0 errors
>> Error in checkEquals(**createTwoStringsAsFactors(), DF, msg =
>> "DataFrame create2 stringsAsFactors = false") : Length mismatch:
>> comparison on first 2 componentsComponent 2: 'current' is not a
>> factorDataFrame create2 stringsAsFactors = false
>> Calls: source -> withVisible -> eval -> eval
>> Execution halted
>> Does it for you?
> Aah. No it does not.
> This is not supported by the new code:
> _["a"] = v,
> _["b"] = s,
> _["stringsAsFactors"] = false );
> I forgot that we support this and ran the tests just before making that
> Do we really need this feature ?
> Romain Francois
> Professional R Enthusiast
> +33(0) 6 28 91 30 30
> R Graph Gallery: http://gallery.r-enthusiasts.**com<http://gallery.r-enthusiasts.com>
> blog: http://blog.r-enthusiasts.com
> |- http://bit.ly/ZTFLDo : Simpler R help tooltips
> `- http://bit.ly/YFsziW : R Help tooltips
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-**project.org<Rcpp-devel at lists.r-forge.r-project.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rcpp-devel