cpp11 icon indicating copy to clipboard operation
cpp11 copied to clipboard

cpp11 helps you to interact with R objects using C++ code.

Results 115 cpp11 issues
Sort by recently updated
recently updated
newest added
trafficstars

Is it possible to evaluate an R function and in case of an error catch the error condition and modify it? For example I want to evaluate `log()` on `x`...

CC @jennybc and @sbearrows This is a long post, and is intended to outline a rather complex problem in a way that we can come back to in the future....

Such as it's the case for `names()`, it would be extremely convenient to have `rownames()` and `colnames()` in cpp codes. My idea (sorry that I don't enough C++) would be...

The internal calc_nrow() doesn't (want to) implement the full vctrs logic, this offers a way for callers to construct a valid data frame in all corner cases.

This link https://community.rstudio.com/new-topic?category=Package%20development&tags=cpp11 It requires the "cpp11" tag t o be created in the forum, so I added ![Screenshot from 2022-04-02 19-38-26](https://user-images.githubusercontent.com/10091065/161404983-b4e404f8-25a7-4b2f-944d-ea110ddd3a61.png) "rcpp" to my question

While trying to troubleshoot some segfaults, I stumbled upon the R option `cpp11_preserve_xptr` that **cpp11** uses internally; https://github.com/r-lib/cpp11/blob/9a62c3a420b076d6ad48c291039421ff739dcc58/inst/include/cpp11/protect.hpp#L380-L405 To be clear, I have no idea what it does, but looking...

``` C:/r_packages/pkgcheck/lib/cpp11/include/cpp11/protect.hpp:430:1: warning: 'cpp11::preserved' defined but not used [-Wunused-variable] 430 | preserved; | ^~~~~~~~~ ```

It seems there are some cases where use of unwind_protect causes issues, since there is a long jump involved, such as within constructors. It might be better to have it...

feature

This PR adds functionality to generate C/C++ APIs which can be accessed from other packages. ## Motivation - Fast communication between packages - Manually creating the required registration and headers...

This PR attempts to force `data_p_` to always be a pointer to the "underlying" type of `SEXP data_`. Currently, this is not the case. `data_p_` currently has type `T*`, which...