You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ro...@apache.org on 2019/06/14 13:45:43 UTC

[arrow] branch master updated: ARROW-5600: [R] R package namespace cleanup

This is an automated email from the ASF dual-hosted git repository.

romainfrancois pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 2ef96c8  ARROW-5600: [R] R package namespace cleanup
2ef96c8 is described below

commit 2ef96c8623cbad1770f82e97df733bd881ab967b
Author: Romain Francois <ro...@rstudio.com>
AuthorDate: Fri Jun 14 15:45:30 2019 +0200

    ARROW-5600: [R] R package namespace cleanup
    
    This is instead of https://github.com/apache/arrow/pull/4491, without the function naming change that we wanted to think about more intentionally.
    
    It also removes a few lingering references to `tibble` in the package, which were still passing in tests because tibble is in Suggests and the test hosts install all of the Suggests packages.
    
    @romainfrancois
    
    Author: Romain Francois <ro...@rstudio.com>
    Author: Neal Richardson <ne...@gmail.com>
    
    Closes #4566 from nealrichardson/clean-imports and squashes the following commits:
    
    e0cf0051 <Romain Francois> not importing glue::glue
    002c0f01 <Romain Francois> no need for glue either at this point
    25d4873b <Neal Richardson> Prune unused Imports; fix a couple of lingering tibble references
---
 r/DESCRIPTION                                            | 4 +---
 r/NAMESPACE                                              | 1 -
 r/R/R6.R                                                 | 2 +-
 r/R/RecordBatch.R                                        | 2 +-
 r/R/Table.R                                              | 2 +-
 r/R/arrow-package.R                                      | 1 -
 r/R/read_table.R                                         | 4 ++--
 r/man/read_table.Rd                                      | 2 +-
 r/tests/testthat/{test-arrow-csv-.R => test-arrow-csv.R} | 0
 9 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/r/DESCRIPTION b/r/DESCRIPTION
index 103a63b..9bec314 100644
--- a/r/DESCRIPTION
+++ b/r/DESCRIPTION
@@ -27,11 +27,8 @@ Imports:
     rlang,
     purrr,
     assertthat,
-    glue,
     R6,
-    vctrs (>= 0.1.0),
     fs,
-    crayon,
     bit64
 Roxygen: list(markdown = TRUE)
 RoxygenNote: 6.1.1
@@ -43,6 +40,7 @@ Suggests:
     roxygen2,
     testthat,
     lubridate,
+    vctrs,
     hms
 Collate:
     'enums.R'
diff --git a/r/NAMESPACE b/r/NAMESPACE
index 3f91568..78cdfd5 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/R6.R b/r/R/R6.R
index e343116..41169f3 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(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 d60c823..8c90254 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 6d50394..d1e4b18 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/arrow-package.R b/r/R/arrow-package.R
index 41cbc2a..faaaf2a 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
diff --git a/r/R/read_table.R b/r/R/read_table.R
index 57ef5ec..ff2c5dd 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 3231b26..c5863c1 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