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/07/06 20:41:34 UTC

[GitHub] [arrow] ianmcook commented on a change in pull request #10638: ARROW-13171: [R] Add binding for str_pad()

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



##########
File path: r/R/dplyr-functions.R
##########
@@ -414,6 +414,25 @@ nse_funcs$pmax <- function(..., na.rm = FALSE) {
   )
 }
 
+nse_funcs$str_pad <- function(string, width, side = c("left", "right", "both"), pad = " ") {
+  
+  side <- match.arg(side)

Review comment:
       Let's do some more argument validation to make better error messages if users pass unexpected inputs:
   ```suggestion
     assert_that(is_integerish(width))
     side <- match.arg(side)
     assert_that(is.string(pad))
   ```




-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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