/
README.Rmd
90 lines (63 loc) · 1.58 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# arrow
[![conda-forge](https://img.shields.io/conda/vn/conda-forge/r-arrow.svg)](https://anaconda.org/conda-forge/r-arrow)
R integration with Apache Arrow.
## Installation
You first need to install the C++ library:
### macOS
On macOS, you may install using homebrew:
```
brew install apache-arrow
```
### From source
First install a release build of the C++ bindings to arrow.
```shell
git clone https://github.com/apache/arrow.git
cd arrow/cpp && mkdir release && cd release
# It is important to statically link to boost libraries
cmake .. -DARROW_PARQUET=ON -DCMAKE_BUILD_TYPE=Release -DARROW_BOOST_USE_SHARED:BOOL=Off
make install
```
## Then the R package
### From github (defaults to master branch)
```r
library("devtools")
devtools::install_github("apache/arrow/r")
```
## Example
```{r}
library(arrow)
(tib <- tibble::tibble(x = 1:10, y = rnorm(10)))
tab <- table(tib)
tab$schema
tab
as_tibble(tab)
```
## Developing
The arrow package is using devtools for package related manipulations. To install:
```r
library.packages("devtools")
```
Within a local clone, one can test changes by running the test suite.
### Running the test suite
```r
library("devtools")
devtools::install_dev_deps()
devtools::test()
```
### Full package validation
```shell
R CMD build --keep-empty-dirs .
R CMD check arrow_*.tar.gz --as-cran --no-manual
```