how many vectors can be added in DataFrame::create( vec1, vec2 … )?

前端 未结 2 855
无人共我
无人共我 2020-12-07 03:57

I am creating a DataFrame to hold a parsed haproxy http log files which has quite a few fields (25+).

If I add more than 20 vectors (one for each field), I get the c

2条回答
  •  一生所求
    2020-12-07 04:09

    The other common approach with Rcpp is to just use an outer list containing as many DataFrame objects (with each limited by the number of elements provided via the old-school macro expansion / repetition) in the corresponding header) as you need.

    In (untested) code:

    Rcpp::DataFrame a = Rcpp::DateFrame::create(/* ... */);
    Rcpp::DataFrame b = Rcpp::DateFrame::create(/* ... */);
    Rcpp::DataFrame c = Rcpp::DateFrame::create(/* ... */);
    
    return Rcpp::List::create(Rcpp::Named("a") = a,
                              Rcpp::Named("b") = b,
                              Rcpp::Named("c") = c);
    

提交回复
热议问题