From 25d4873be89c3263101c60215969447677674f18 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Thu, 13 Jun 2019 16:22:07 -0700 Subject: [PATCH 1/3] Prune unused Imports; fix a couple of lingering tibble references --- r/DESCRIPTION | 3 +-- r/R/R6.R | 2 +- r/R/RecordBatch.R | 2 +- r/R/Table.R | 2 +- r/R/read_table.R | 4 ++-- r/man/read_table.Rd | 2 +- r/tests/testthat/{test-arrow-csv-.R => test-arrow-csv.R} | 0 7 files changed, 7 insertions(+), 8 deletions(-) rename r/tests/testthat/{test-arrow-csv-.R => test-arrow-csv.R} (100%) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 103a63bea92..8f72d4f9b17 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -29,9 +29,7 @@ Imports: assertthat, glue, R6, - vctrs (>= 0.1.0), fs, - crayon, bit64 Roxygen: list(markdown = TRUE) RoxygenNote: 6.1.1 @@ -43,6 +41,7 @@ Suggests: roxygen2, testthat, lubridate, + vctrs (>= 0.1.0), hms Collate: 'enums.R' diff --git a/r/R/R6.R b/r/R/R6.R index e3431165420..9aa1d64dfa7 100644 --- a/r/R/R6.R +++ b/r/R/R6.R @@ -26,7 +26,7 @@ self$`.:xp:.` <- xp }, print = function(...){ - cat(crayon::silver(glue::glue("{cl}", cl = class(self)[[1]])), "\n") + cat(glue::glue("{cl}", cl = class(self)[[1]]), "\n") if(!is.null(self$ToString)){ cat(self$ToString(), "\n") } diff --git a/r/R/RecordBatch.R b/r/R/RecordBatch.R index d60c8239481..8c902542046 100644 --- a/r/R/RecordBatch.R +++ b/r/R/RecordBatch.R @@ -97,7 +97,7 @@ #' @return a [arrow::RecordBatch][arrow__RecordBatch] #' @export record_batch <- function(..., schema = NULL){ - arrays <- tibble::lst(...) + arrays <- list2(...) stopifnot(length(arrays) > 0) shared_ptr(`arrow::RecordBatch`, RecordBatch__from_arrays(schema, arrays)) } diff --git a/r/R/Table.R b/r/R/Table.R index 6d5039457a4..d1e4b18a774 100644 --- a/r/R/Table.R +++ b/r/R/Table.R @@ -60,7 +60,7 @@ #' #' @export table <- function(..., schema = NULL){ - dots <- tibble::lst(...) + dots <- list2(...) stopifnot(length(dots) > 0) shared_ptr(`arrow::Table`, Table__from_dots(dots, schema)) } diff --git a/r/R/read_table.R b/r/R/read_table.R index 57ef5ec4914..ff2c5dd8c17 100644 --- a/r/R/read_table.R +++ b/r/R/read_table.R @@ -36,7 +36,7 @@ #' @return #' #' - `read_table` returns an [arrow::Table][arrow__Table] -#' - `read_arrow` returns a [tibble::tibble()] +#' - `read_arrow` returns a `data.frame` #' #' @details #' @@ -84,5 +84,5 @@ read_table.fs_path <- function(stream) { #' @rdname read_table #' @export read_arrow <- function(stream){ - as_tibble(read_table(stream)) + as.data.frame(read_table(stream)) } diff --git a/r/man/read_table.Rd b/r/man/read_table.Rd index 3231b26da26..c5863c1d43e 100644 --- a/r/man/read_table.Rd +++ b/r/man/read_table.Rd @@ -27,7 +27,7 @@ to process it. \value{ \itemize{ \item \code{read_table} returns an \link[=arrow__Table]{arrow::Table} -\item \code{read_arrow} returns a \code{\link[tibble:tibble]{tibble::tibble()}} +\item \code{read_arrow} returns a \code{data.frame} } } \description{ diff --git a/r/tests/testthat/test-arrow-csv-.R b/r/tests/testthat/test-arrow-csv.R similarity index 100% rename from r/tests/testthat/test-arrow-csv-.R rename to r/tests/testthat/test-arrow-csv.R From 002c0f01b2f4a34b9c2b1bd9f5efa95624baa411 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Fri, 14 Jun 2019 12:27:41 +0200 Subject: [PATCH 2/3] no need for glue either at this point --- r/DESCRIPTION | 3 +-- r/R/R6.R | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 8f72d4f9b17..9bec314b6dc 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -27,7 +27,6 @@ Imports: rlang, purrr, assertthat, - glue, R6, fs, bit64 @@ -41,7 +40,7 @@ Suggests: roxygen2, testthat, lubridate, - vctrs (>= 0.1.0), + vctrs, hms Collate: 'enums.R' diff --git a/r/R/R6.R b/r/R/R6.R index 9aa1d64dfa7..41169f3147a 100644 --- a/r/R/R6.R +++ b/r/R/R6.R @@ -26,7 +26,7 @@ self$`.:xp:.` <- xp }, print = function(...){ - cat(glue::glue("{cl}", cl = class(self)[[1]]), "\n") + cat(class(self)[[1]], "\n") if(!is.null(self$ToString)){ cat(self$ToString(), "\n") } From e0cf0051558d0619742360b69b0c841d93f1fe17 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Fri, 14 Jun 2019 13:42:59 +0200 Subject: [PATCH 3/3] not importing glue::glue --- r/NAMESPACE | 1 - r/R/arrow-package.R | 1 - 2 files changed, 2 deletions(-) diff --git a/r/NAMESPACE b/r/NAMESPACE index 3f91568d33e..78cdfd5655e 100644 --- a/r/NAMESPACE +++ b/r/NAMESPACE @@ -173,7 +173,6 @@ importFrom(Rcpp,sourceCpp) importFrom(assertthat,assert_that) importFrom(bit64,print.integer64) importFrom(bit64,str.integer64) -importFrom(glue,glue) importFrom(purrr,map) importFrom(purrr,map2) importFrom(purrr,map_int) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index 41cbc2a0569..faaaf2a84b2 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -16,7 +16,6 @@ # under the License. #' @importFrom R6 R6Class -#' @importFrom glue glue #' @importFrom purrr map map_int map2 #' @importFrom assertthat assert_that #' @importFrom rlang list2 %||% is_false abort dots_n warn