You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "eitsupi (via GitHub)" <gi...@apache.org> on 2023/07/07 03:20:24 UTC

[GitHub] [arrow] eitsupi commented on issue #36458: [R] no applicable method for 'drop_na' applied to an object of class "arrow_dplyr_query"

eitsupi commented on issue #36458:
URL: https://github.com/apache/arrow/issues/36458#issuecomment-1624594686

   We can use `dplyr::filter` with `dplyr::across` for this use case.
   
   ``` r
   df <- data.frame(a = 1:3, b = c("a", NA, "c"))
   
   df |>
     arrow::as_arrow_table() |>
     dplyr::filter(dplyr::across(everything(), ~ !is.na(.))) |>
     dplyr::collect()
   #>   a b
   #> 1 1 a
   #> 2 3 c
   ```
   
   <sup>Created on 2023-07-07 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup>
   
   Note that this is why dbplyr does not implement drop_na either. tidyverse/dbplyr#999
   
   Related issue tidyverse/tidyr#939


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