You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/07 20:00:10 UTC

[GitHub] [arrow] ianmcook commented on a change in pull request #10269: ARROW-11705: [R] Support scalar value recycling in RecordBatch/Table$create()

ianmcook commented on a change in pull request #10269:
URL: https://github.com/apache/arrow/pull/10269#discussion_r628474112



##########
File path: r/R/table.R
##########
@@ -175,6 +175,16 @@ Table$create <- function(..., schema = NULL) {
     return(dplyr::group_by(out, !!!dplyr::groups(dots[[1]])))
   }
   
+  # If any arrays are length 1, recycle them  
+  arr_lens <- map(dots, length)
+  if (length(dots) > 1 && any(arr_lens == 1) && !all(arr_lens==1)){
+    dots <- purrr::modify2(

Review comment:
       In `arrow-package.R`, add `modify2` to the line beginning with `#' @importFrom purrr`. Then do `devtools::document()` to update the `NAMESPACE` file. Then remove the `purrr::` from this line.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org