Plenty of tutorials have been posted online for writing Rcpp packages in Rstudio, but few tutorials mention developing R packages in vim.
After some attempt, I have figure out the solution by myself.
- Rcpp in R
- neovim (with coc.nvim)
set up a new project
R -e 'Rcpp::Rcpp.package.skeleton("mypackage")' cd ./mypackage
create ccls config file (
.ccls) in the project, and fill it with the following settings.
clang %c -std=c11 %cpp -std=c++2a -I/home/yech/.local/lib/R-3.6/library/Rcpp/include/ -I/usr/include/R
Last modified on 2022-10-31