问题
The R
package arrow
installed with install.packages('arrow')
does not have lz4
support:
codec_is_available('lz4')
# [1] FALSE
The package version is:
packageVersion('arrow')
# [1] ‘0.17.1’
This is on Ubuntu 20.04.
How can I get an R
arrow
package with lz4
support?
回答1:
According to the docs, you can use export LIBARROW_MINIMAL=false
when building from source to make a build which supports compression:
You can also install the R package from a git checkout:
git clone https://github.com/apache/arrow cd arrow/r R CMD INSTALL .
If you don't already have the Arrow C++ libraries on your system, when installing the R package from source, it will also download and build the Arrow C++ libraries for you. To speed installation up, you can set
export LIBARROW_BINARY=true
to look for C++ binaries prebuilt for your Linux distribution/version. Alternatively, you can set
export LIBARROW_MINIMAL=false
to build the Arrow libraries with optional features such as compression libraries enabled. This will increase the build time but provides many useful features. Prebuilt binaries are built with this flag enabled, so you get the full functionality by using them as well.
来源:https://stackoverflow.com/questions/63096059/how-to-get-the-arrow-package-for-r-with-lz4-support