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

npr 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 ca18e8a  ARROW-14252 [R] Partial matching of arguments warning
ca18e8a is described below

commit ca18e8aae80b4199195cfa7d5eb29971d5f6f241
Author: Dragos Moldovan-Grünfeld <[email protected]>
AuthorDate: Mon Oct 11 14:45:17 2021 -0400

    ARROW-14252 [R] Partial matching of arguments warning
    
    Closes #11371 from dragosmg/ARROW-14252_partial_match_arg_warn
    
    Authored-by: Dragos Moldovan-Grünfeld <[email protected]>
    Signed-off-by: Neal Richardson <[email protected]>
---
 ci/etc/rprofile                | 11 +++++++----
 r/R/dplyr.R                    |  2 +-
 r/tests/testthat/helper-data.R |  2 +-
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ci/etc/rprofile b/ci/etc/rprofile
index 229a010..497e192 100644
--- a/ci/etc/rprofile
+++ b/ci/etc/rprofile
@@ -3,7 +3,7 @@
     # Return a CRAN repo URL, preferring RSPM binaries if available for this OS
     rspm_template <- 
"https://packagemanager.rstudio.com/cran/__linux__/%s/latest";
     supported_os <- c("focal", "xenial", "bionic", "centos7", "centos8", 
"opensuse42", "opensuse15", "opensuse152")
-  
+
     if (nzchar(Sys.which("lsb_release"))) {
       os <- tolower(system("lsb_release -cs", intern = TRUE))
       if (os %in% supported_os) {
@@ -37,10 +37,10 @@
         return(sprintf(rspm_template, os))
       }
     }
-  
+
     return("https://cloud.r-project.org";)
   }
-  
+
   options(
     Ncpus = parallel::detectCores(),
     repos = tryCatch(.pick_cran(), error = function(e) 
"https://cloud.r-project.org";),
@@ -48,6 +48,9 @@
       'R/%s R (%s)',
       getRversion(),
       paste(getRversion(), R.version$platform, R.version$arch, R.version$os)
-    )
+    ),
+    warnPartialMatchAttr = TRUE,
+    warnPartialMatchDollar = TRUE,
+    warnPartialMatchArgs = TRUE
   )
 })
diff --git a/r/R/dplyr.R b/r/R/dplyr.R
index c783f3e..cc46284 100644
--- a/r/R/dplyr.R
+++ b/r/R/dplyr.R
@@ -147,7 +147,7 @@ dim.arrow_dplyr_query <- function(x) {
   if (is_collapsed(x)) {
     # Don't evaluate just for nrow
     rows <- NA_integer_
-  } else if (isTRUE(x$filtered)) {
+  } else if (isTRUE(x$filtered_rows)) {
     rows <- x$.data$num_rows
   } else {
     rows <- Scanner$create(x)$CountRows()
diff --git a/r/tests/testthat/helper-data.R b/r/tests/testthat/helper-data.R
index 2a53f64..c693e84 100644
--- a/r/tests/testthat/helper-data.R
+++ b/r/tests/testthat/helper-data.R
@@ -117,7 +117,7 @@ make_random_string_of_size <- function(size = 1) {
 }
 
 make_string_of_size <- function(size = 1) {
-  paste(rep(letters, length = 1000 * size), collapse = "")
+  paste(rep(letters, length.out = 1000 * size), collapse = "")
 }
 
 example_with_extra_metadata <- example_with_metadata

Reply via email to