Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ci/windows-pkg-arrow-for-r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ mv mingw64/include $DST_DIR
mkdir -p $DST_DIR/lib-4.9.3/x64
mv mingw64/lib/*.a $DST_DIR/lib-4.9.3/x64
# Same for the 32-bit versions
mkdir -p $DST_DIR/lib-4.9.3/i686
mv mingw32/lib/*.a $DST_DIR/lib-4.9.3/i686
mkdir -p $DST_DIR/lib-4.9.3/i386
mv mingw32/lib/*.a $DST_DIR/lib-4.9.3/i386

mkdir deps && cd deps
# Get these from "backports" so they were compiled with gcc 4.9
Expand All @@ -58,9 +58,9 @@ ls | xargs -n 1 tar -xJf
cd ..

mkdir -p $DST_DIR/lib/x64
mkdir -p $DST_DIR/lib/i686
mkdir -p $DST_DIR/lib/i386
mv deps/mingw64/lib/*.a $DST_DIR/lib/x64
mv deps/mingw32/lib/*.a $DST_DIR/lib/i686
mv deps/mingw32/lib/*.a $DST_DIR/lib/i386

# Create build artifact
zip -r ${DST_DIR}.zip $DST_DIR
Expand Down
7 changes: 4 additions & 3 deletions r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ Package: arrow
Title: Integration to 'Apache' 'Arrow'
Version: 0.14.1.9000
Authors@R: c(
person("Romain", "Fran\u00e7ois", email = "romain@rstudio.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-2444-4226")),
person("Romain", "Fran\u00e7ois", email = "romain@rstudio.com", role = c("aut"), comment = c(ORCID = "0000-0002-2444-4226")),
person("Jeroen", "Ooms", email = "jeroen@berkeley.edu", role = c("aut")),
person("Neal", "Richardson", email = "neal@ursalabs.org", role = c("aut")),
person("Neal", "Richardson", email = "neal@ursalabs.org", role = c("aut", "cre")),
person("Javier", "Luraschi", email = "javier@rstudio.com", role = c("ctb")),
person("Jeffrey", "Wong", email = "jeffreyw@netflix.com", role = c("ctb")),
person("Apache Arrow", email = "dev@arrow.apache.org", role = c("aut", "cph"))
Expand All @@ -13,7 +13,7 @@ Description: 'Apache' 'Arrow' <https://arrow.apache.org/> is a cross-language
development platform for in-memory data. It specifies a standardized
language-independent columnar memory format for flat and hierarchical data,
organized for efficient analytic operations on modern hardware. This
package provides an interface to the Arrow C++ library.
package provides an interface to the 'Arrow C++' library.
Depends: R (>= 3.1)
License: Apache License (>= 2.0)
URL: https://github.com/apache/arrow/
Expand All @@ -22,6 +22,7 @@ Encoding: UTF-8
Language: en-US
LazyData: true
SystemRequirements: C++11
Biarch: true
LinkingTo:
Rcpp (>= 1.0.1)
Imports:
Expand Down
1 change: 1 addition & 0 deletions r/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ deps:
R --slave -e 'lib <- Sys.getenv("R_LIB", .libPaths()[1]); install.packages("devtools", repo="https://cloud.r-project.org", lib=lib); devtools::install_dev_deps(lib=lib)'

build: doc
cp ../NOTICE.txt inst/NOTICE.txt
R CMD build .

check: build
Expand Down
2 changes: 1 addition & 1 deletion r/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,6 @@ importFrom(tidyselect,num_range)
importFrom(tidyselect,one_of)
importFrom(tidyselect,starts_with)
importFrom(tidyselect,vars_select)
importFrom(utils,installed.packages)
importFrom(utils,packageDescription)
importFrom(utils,packageVersion)
useDynLib(arrow, .registration = TRUE)
8 changes: 4 additions & 4 deletions r/R/Field.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
#' @param metadata currently ignored
#'
#' @examples
#'
#' \dontrun{
#' \donttest{
#' try({
#' field("x", int32())
#' })
#' }
#'
#' @export
field <- function(name, type, metadata) {
assert_that(inherits(name, "character"), length(name) == 1L)
Expand All @@ -78,6 +78,6 @@ field <- function(name, type, metadata) {
}

.fields <- function(.list){
assert_that( !is.null(nms <- names(.list)) )
assert_that(!is.null(nms <- names(.list)))
map2(nms, .list, field)
}
12 changes: 12 additions & 0 deletions r/R/csv.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@
#'
#' @return A `data.frame`, or an `arrow::Table` if `as_tibble = FALSE`.
#' @export
#' @examples
#' \donttest{
#' try({
#' tf <- tempfile()
#' on.exit(unlink(tf))
#' write.csv(iris, file = tf)
#' df <- read_csv_arrow(tf)
#' dim(df)
#' # Can select columns
#' df <- read_csv_arrow(tf, col_select = starts_with("Sepal"))
#' })
#' }
read_delim_arrow <- function(file,
delim = ",",
quote = '"',
Expand Down
20 changes: 20 additions & 0 deletions r/R/feather.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ FeatherTableWriter <- function(stream) {
#' @param stream A file path or an `arrow::io::OutputStream`
#'
#' @export
#' @examples
#' \donttest{
#' try({
#' tf <- tempfile()
#' on.exit(unlink(tf))
#' write_feather(mtcars, tf)
#' })
#' }
write_feather <- function(data, stream) {
UseMethod("write_feather", data)
}
Expand Down Expand Up @@ -169,6 +177,18 @@ FeatherTableReader.fs_path <- function(file, mmap = TRUE, ...) {
#' @return A `data.frame` if `as_tibble` is `TRUE` (the default), or a [arrow::Table][arrow__Table] otherwise
#'
#' @export
#' @examples
#' \donttest{
#' try({
#' tf <- tempfile()
#' on.exit(unlink(tf))
#' write_feather(iris, tf)
#' df <- read_feather(tf)
#' dim(df)
#' # Can select columns
#' df <- read_feather(tf, col_select = starts_with("Sepal"))
#' })
#' }
read_feather <- function(file, col_select = NULL, as_tibble = TRUE, ...){
reader <- FeatherTableReader(file, ...)

Expand Down
7 changes: 4 additions & 3 deletions r/R/install-arrow.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
#' first. This function offers guidance on how to get the C++ library depending
#' on your operating system and package version.
#' @export
#' @importFrom utils packageVersion installed.packages
#' @importFrom utils packageVersion packageDescription
#' @examples
#' install_arrow()
install_arrow <- function() {
os <- tolower(Sys.info()[["sysname"]])
# c("windows", "darwin", "linux", "sunos") # win/mac/linux/solaris
version <- packageVersion("arrow")
# From CRAN check:
rep <- installed.packages(fields="Repository")["arrow", "Repository"]
from_cran <- identical(rep, "CRAN")
from_cran <- identical(packageDescription("arrow")$Repository, "CRAN")
# Is it possible to tell if was a binary install from CRAN vs. source?

message(install_arrow_msg(arrow_available(), version, from_cran, os))
Expand Down
13 changes: 13 additions & 0 deletions r/R/json.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,19 @@ json_table_reader.default <- function(file,
#'
#' @return A `data.frame`, or an `arrow::Table` if `as_tibble = FALSE`.
#' @export
#' @examples
#' \donttest{
#' try({
#' tf <- tempfile()
#' on.exit(unlink(tf))
#' writeLines('
#' { "hello": 3.5, "world": false, "yo": "thing" }
#' { "hello": 3.25, "world": null }
#' { "hello": 0.0, "world": true, "yo": null }
#' ', tf, useBytes=TRUE)
#' df <- read_json_arrow(tf)
#' })
#' }
read_json_arrow <- function(file, col_select = NULL, as_tibble = TRUE, ...) {
tab <- json_table_reader(file, ...)$Read()$select(!!enquo(col_select))

Expand Down
13 changes: 7 additions & 6 deletions r/R/parquet.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ parquet_file_reader.character <- function(file, props = parquet_arrow_reader_pro
#' @return A [arrow::Table][arrow__Table], or a `data.frame` if `as_tibble` is
#' `TRUE`.
#' @examples
#'
#' \dontrun{
#' \donttest{
#' try({
#' df <- read_parquet(system.file("v0.7.1.parquet", package="arrow"))
#' })
#' }
#'
#' @export
read_parquet <- function(file, col_select = NULL, as_tibble = TRUE, props = parquet_arrow_reader_properties(), ...) {
reader <- parquet_file_reader(file, props = props, ...)
Expand All @@ -134,12 +134,13 @@ read_parquet <- function(file, col_select = NULL, as_tibble = TRUE, props = parq
#' @param file a file path
#'
#' @examples
#'
#' \dontrun{
#' \donttest{
#' try({
#' tf <- tempfile(fileext = ".parquet")
#' on.exit(unlink(tf))
#' write_parquet(tibble::tibble(x = 1:5), tf)
#' })
#' }
#'
#' @export
write_parquet <- function(table, file) {
write_parquet_file(to_arrow(table), file)
Expand Down
39 changes: 22 additions & 17 deletions r/cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
## Test environments
* local OS X install, R 3.5.3
* win-builder (devel and release)
* Debian Linux, R-devel, GCC ASAN/UBSAN
* Ubuntu Linux 16.04 LTS, R-release, GCC
* win-builder (R-devel and R-release)
* macOS (10.11, 10.14), R-release
* Oracle Solaris 10, x86, 32-bit, R-patched

## R CMD check results

0 errors | 0 warnings | 1 note
There were no ERRORs or WARNINGs. On some platforms, there is a NOTE about the installed package size, as well as the "New submission" NOTE.

* This is a new release.
## Feedback from previous submission

## Platform support
Version 0.14.1 was submitted to CRAN on 24 July 2019. The CRAN team requested two revisions:

This package supports Windows and macOS but not Linux.
1. Put quotes around 'Arrow C++' in the package Description.

The Arrow project is cross-language development platform
for in-memory data, it spans several languages and
their code base is quite large (about 150K lines of C
sources and more than 600K lines across all languages).
2. Remove usage of utils::installed.packages()

In the future, the Apache Arrow project will release
binaries in the official Fedora and Debian repos;
we're working on hard on this, but due to the size,
this is likely to be implemented until next year.
Both have been addressed in this resubmission.

In the meantime, R users can install the Linux binaries
from custom repos or build Arrow from source when using
Linux.
## Feedback from initial submission

Version 0.14.0 was submitted to CRAN on 18 July 2019. The CRAN team requested two revisions, which have been addressed in this re-submission.

1. Source files contain a comment header, required in all source files in Apache Software Foundation projects (see https://www.apache.org/legal/src-headers.html), which mentions a NOTICE file. But the NOTICE file was not included in the package.

This submission includes a NOTICE.txt file in the inst/ directory.

2. Rd files for main exported functions should have executable (not in \dontrun{}) examples.

This submission includes examples for the user-facing functions (read_parquet, write_parquet, read_feather, write_feather, et al.)
84 changes: 84 additions & 0 deletions r/inst/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
Apache Arrow
Copyright 2016-2019 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

This product includes software from the SFrame project (BSD, 3-clause).
* Copyright (C) 2015 Dato, Inc.
* Copyright (c) 2009 Carnegie Mellon University.

This product includes software from the Feather project (Apache 2.0)
https://github.com/wesm/feather

This product includes software from the DyND project (BSD 2-clause)
https://github.com/libdynd

This product includes software from the LLVM project
* distributed under the University of Illinois Open Source

This product includes software from the google-lint project
* Copyright (c) 2009 Google Inc. All rights reserved.

This product includes software from the mman-win32 project
* Copyright https://code.google.com/p/mman-win32/
* Licensed under the MIT License;

This product includes software from the LevelDB project
* Copyright (c) 2011 The LevelDB Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* Moved from Kudu http://github.com/cloudera/kudu

This product includes software from the CMake project
* Copyright 2001-2009 Kitware, Inc.
* Copyright 2012-2014 Continuum Analytics, Inc.
* All rights reserved.

This product includes software from https://github.com/matthew-brett/multibuild (BSD 2-clause)
* Copyright (c) 2013-2016, Matt Terry and Matthew Brett; all rights reserved.

This product includes software from the Ibis project (Apache 2.0)
* Copyright (c) 2015 Cloudera, Inc.
* https://github.com/cloudera/ibis

This product includes software from Dremio (Apache 2.0)
* Copyright (C) 2017-2018 Dremio Corporation
* https://github.com/dremio/dremio-oss

This product includes software from Google Guava (Apache 2.0)
* Copyright (C) 2007 The Guava Authors
* https://github.com/google/guava

This product include software from CMake (BSD 3-Clause)
* CMake - Cross Platform Makefile Generator
* Copyright 2000-2019 Kitware, Inc. and Contributors

The web site includes files generated by Jekyll.

--------------------------------------------------------------------------------

This product includes code from Apache Kudu, which includes the following in
its NOTICE file:

Apache Kudu
Copyright 2016 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Portions of this software were developed at
Cloudera, Inc (http://www.cloudera.com/).

--------------------------------------------------------------------------------

This product includes code from Apache ORC, which includes the following in
its NOTICE file:

Apache ORC
Copyright 2013-2019 The Apache Software Foundation

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).

This product includes software developed by Hewlett-Packard:
(c) Copyright [2014-2015] Hewlett-Packard Development Company, L.P
6 changes: 3 additions & 3 deletions r/man/arrow-package.Rd

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

6 changes: 3 additions & 3 deletions r/man/field.Rd

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

3 changes: 3 additions & 0 deletions r/man/install_arrow.Rd

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

Loading