``` r cpp11::cpp_function(' data_frame foo() { writable::integers x, y; for (int i = 0; i < 10; ++i) { x.push_back(i); y.push_back(i); } return writable::data_frame({ "x"_nm = x, "y"_nm = y }); }') foo() #> x y #> 1 0 0 #> 2 1 1 #> 3 2 2 #> 4 3 3 #> 5 4 4 #> 6 5 5 #> 7 6 6 #> 8 7 7 #> 9 8 8 #> 10 9 9 #> 11 NA NA #> 12 NA NA #> 13 NA NA #> 14 NA NA #> 15 NA NA #> 16 NA NA ``` <sup>Created on 2020-08-13 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)</sup> cc @thomasp85