Skip to content

Commit

Permalink
ARROW-8188: [R] Adapt to latest checks in R-devel
Browse files Browse the repository at this point in the history
Closes #6692 from nealrichardson/r-devel-2020-03-23

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
  • Loading branch information
nealrichardson committed Mar 23, 2020
1 parent 4ca83c8 commit 8642a1e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 16 deletions.
19 changes: 13 additions & 6 deletions r/R/parquet.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
#' `TRUE` (the default).
#' @examples
#' \donttest{
#' df <- read_parquet(system.file("v0.7.1.parquet", package="arrow"))
#' tf <- tempfile()
#' on.exit(unlink(tf))
#' write_parquet(mtcars, tf)
#' df <- read_parquet(tf)
#' head(df)
#' }
#' @export
Expand Down Expand Up @@ -107,9 +110,10 @@ read_parquet <- function(file,
#' write_parquet(data.frame(x = 1:5), tf1)
#'
#' # using compression
#' tf2 <- tempfile(fileext = ".gz.parquet")
#' write_parquet(data.frame(x = 1:5), tf2, compression = "gzip", compression_level = 5)
#'
#' if (codec_is_available("gzip")) {
#' tf2 <- tempfile(fileext = ".gz.parquet")
#' write_parquet(data.frame(x = 1:5), tf2, compression = "gzip", compression_level = 5)
#' }
#' }
#' @export
write_parquet <- function(x,
Expand Down Expand Up @@ -437,8 +441,11 @@ ParquetFileWriter$create <- function(
#' f <- system.file("v0.7.1.parquet", package="arrow")
#' pq <- ParquetFileReader$create(f)
#' pq$GetSchema()
#' tab <- pq$ReadTable(starts_with("c"))
#' tab$schema
#' if (codec_is_available("snappy")) {
#' # This file has compressed data columns
#' tab <- pq$ReadTable(starts_with("c"))
#' tab$schema
#' }
#' }
#' @include arrow-package.R
ParquetFileReader <- R6Class("ParquetFileReader",
Expand Down
8 changes: 4 additions & 4 deletions r/configure
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ else
elif [ "$UNAME" = "Linux" ]; then
# Set some default values/backwards compatibility
if [ "${LIBARROW_DOWNLOAD}" = "" ] && [ "${NOT_CRAN}" != "" ]; then
export LIBARROW_DOWNLOAD=$NOT_CRAN
LIBARROW_DOWNLOAD=$NOT_CRAN; export LIBARROW_DOWNLOAD
fi
if [ "${LIBARROW_BINARY}" = "" ] && [ "${NOT_CRAN}" != "" ]; then
export LIBARROW_BINARY=$NOT_CRAN
LIBARROW_BINARY=$NOT_CRAN; export LIBARROW_BINARY
fi
if [ "${LIBARROW_MINIMAL}" = "" ] && [ "${LIBARROW_DOWNLOAD}" = "true" ]; then
export LIBARROW_MINIMAL=false
LIBARROW_MINIMAL=false; export LIBARROW_MINIMAL
fi
if [ "${LIBARROW_MINIMAL}" = "" ] && [ "${NOT_CRAN}" = "true" ]; then
export LIBARROW_MINIMAL=false
LIBARROW_MINIMAL=false; export LIBARROW_MINIMAL
fi
${R_HOME}/bin/Rscript tools/linuxlibs.R $VERSION
PKG_CFLAGS="-I$(pwd)/libarrow/arrow-${VERSION}/include $PKG_CFLAGS"
Expand Down
7 changes: 5 additions & 2 deletions r/man/ParquetFileReader.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion r/man/read_parquet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions r/man/write_parquet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8642a1e

Please sign in to comment.