nealrichardson commented on a change in pull request #10056:
URL: https://github.com/apache/arrow/pull/10056#discussion_r617838462
##########
File path: r/R/arrow-datum.R
##########
@@ -46,6 +46,22 @@ as.vector.ArrowDatum <- function(x, mode) {
)
}
+#' @export
+na.omit.ArrowDatum <- function(object, ...){
+ object$Filter(!is.na(object))
+}
+
+#' @export
+na.exclude.ArrowDatum <- na.omit.ArrowDatum
+
+#' @export
+na.fail.ArrowDatum <- function(object, ...){
+ if(object$null_count > 0){
+ stop("missing values in object")
Review comment:
One nit on spacing around `if()` to match our existing code style, and
we always do `call. = FALSE` on `stop()`
```suggestion
if (object$null_count > 0) {
stop("missing values in object", call. = FALSE)
```
--
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:
[email protected]