etiennebacher / tidypolars

Get the power of polars with the syntax of the tidyverse
https://tidypolars.etiennebacher.com
Other
141 stars 3 forks source link

Handle explicit namespace with `::` in expressions #114

Closed etiennebacher closed 1 month ago

etiennebacher commented 1 month ago

Close #113

Also better error message when a function is unknown:

library(dplyr, warn.conflicts = FALSE)
library(tidypolars)

dat <- tibble(x = 1:3) |> as_polars_df()

dat |> 
  mutate(y = frank(x))
#> Error in `mutate()`:
#> ! `tidypolars` doesn't know how to translate this function: `frank()`

dat |> 
  mutate(y = data.table::frank(x))
#> Error in `mutate()`:
#> ! `tidypolars` doesn't know how to translate this function: `data.table::frank()`

library(data.table, warn.conflicts = FALSE)

dat |> 
  mutate(y = frank(x))
#> Error in `mutate()`:
#> ! `tidypolars` doesn't know how to translate this function: `frank()`