etiennebacher / tidypolars

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

Error in UseMethod("summarise") : no applicable method for 'summarise' applied to an object of class "RPolarsDataFrame" #78

Closed DDHGITHUB closed 5 months ago

DDHGITHUB commented 6 months ago

Describe the bug Write here a clear and concise description of what the bug is.

To Reproduce Please use the R package reprex to create a minimal and reproducible example. Paste the output here.

Expected behavior Write here a clear and concise description of what you expected to happen.

DDHGITHUB commented 6 months ago

I struggle to get tidypolars to work. I keep getting the following error: Error in UseMethod("mutate") : no applicable method for 'mutate' applied to an object of class "RPolarsDataFrame" Ie, when i run any of the examples I get the error, ie:

library(dplyr, warn.conflicts = FALSE)

mtcars |> as_polars() |> mutate( across( .cols = contains("a"), list(mean = mean, stand = pl_standardize, ~ sd(.x)) ) )

What am I doing wrong ?

etiennebacher commented 6 months ago

Hi, the problem is probably that you have polars >= 0.12.0 but tidypolars < 0.5.0. Can you install the latest version of tidypolars and let me know if the problem goes away?

etiennebacher commented 5 months ago

@DDHGITHUB The issue should be fixed by installing the latest version of tidypolars (0.5.0 at the time of writing). I close this but feel free to reopen if the problem persists.