https://github.com/doccstat/abseil-r
Abseil C++ Header Files For R
https://github.com/doccstat/abseil-r
Last synced: 14 days ago
JSON representation
Abseil C++ Header Files For R
- Host: GitHub
- URL: https://github.com/doccstat/abseil-r
- Owner: doccstat
- License: apache-2.0
- Created: 2023-09-10T03:32:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-07-12T00:59:28.000Z (15 days ago)
- Last Synced: 2026-07-12T02:17:29.906Z (15 days ago)
- Language: C++
- Homepage: https://abseil.xingchi.li/
- Size: 8.84 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
options(cli.hyperlink = FALSE, eval = TRUE)
```
# abseil: Abseil Headers for R 
[](https://cran.r-project.org/package=abseil)
[](https://cran.r-project.org/package=abseil)
[](https://github.com/doccstat/abseil-r/actions)
[](https://github.com/doccstat/abseil-r)
[](https://doccstat.r-universe.dev)
## Synopsis
This package provides [R](https://www.r-project.org) with access to
[Abseil](https://abseil.io) header files.
This package is a direct import of [Abseil](https://abseil.io) libraries.
It can be used via the `LinkingTo:` field in the `DESCRIPTION` field of an R
package --- and the R package infrastructure tools will then know how to set
include flags correctly on all architectures supported by R.
## Installation
```{r eval = FALSE}
# Install from CRAN
install.packages("abseil")
```
Development version
```{r eval = FALSE}
# Development version from r-universe with CRAN version as a fallback
install.packages(
"abseil",
repos = c("https://doccstat.r-universe.dev", "https://cloud.r-project.org")
)
## install.packages("pak")
pak::pak("doccstat/abseil-r")
## install.packages("devtools")
devtools::install_github("doccstat/abseil-r")
```
## Example
Directly usage in R
```{r}
Rcpp::cppFunction(r"{
#include "absl/strings/str_join.h"
std::string joinString() {
std::vector v = {"foo","bar","baz"};
return absl::StrJoin(v, "-");
}
}", depends = "abseil")
joinString()
```
Usage in Rcpp package
``` cpp
#include
#include "absl/strings/str_join.h"
//' @export
// [[Rcpp::export]]
std::string joinString() {
std::vector v = {"foo","bar","baz"};
return absl::StrJoin(v, "-");
}
```
Bare minimum R package using the `abseil` package can be found at
[doccstat/abseil-r-example](https://github.com/doccstat/abseil-r-example).
## Authors
Abseil Team, Xingchi Li
## Contact us
For bugs related to Abseil logistics, please report the issue to the official
[Abseil GitHub Repo](https://github.com/abseil/abseil-cpp).
1. File a ticket at
[GitHub Issues](https://github.com/doccstat/abseil-r/issues).
2. Contact the authors specified in
[DESCRIPTION](https://github.com/doccstat/abseil-r/blob/main/DESCRIPTION#L5-L9).
## Stargazers over time
[](https://starchart.cc/doccstat/abseil-r)
## License
This package is provided under the same license as Abseil itself, the
Apache-2.0 license.