Skip to content

Commit

Permalink
feat!: bump polars to rs-0.45.1 (#1302)
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi authored Dec 10, 2024
1 parent b6e7de4 commit 5818667
Show file tree
Hide file tree
Showing 13 changed files with 593 additions and 474 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,5 @@ Collate:
'zzz.R'
Config/rextendr/version: 0.3.1
VignetteBuilder: knitr
Config/polars/LibVersion: 0.44.0
Config/polars/RustToolchainVersion: nightly-2024-10-28
Config/polars/LibVersion: 0.45.0
Config/polars/RustToolchainVersion: nightly-2024-11-28
15 changes: 15 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# NEWS

> [!IMPORTANT]
>
> This package is now in maintenance mode,
> meaning that important bugs will be fixed if possible but we won't adding new features in the next few weeks / months.
>
> The focus of future development is on a completely rewritten version (`neopolars`) that currently exists in the `next` branch.
> The package in that branch will become the new `polars` package once the rewrite is complete.
>
> Please check the GitHub issue #1152.
## Polars R Package (development version)

### Breaking changes

- Updated Rust Polars to 0.45.1 (#1302).
- The `ddof` argument of `pl$corr()` is removed.

## Polars R Package 0.21.0

### Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion R/extendr-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ RPolarsExpr$cov <- function(a, b, ddof) .Call(wrap__RPolarsExpr__cov, a, b, ddof

RPolarsExpr$rolling_cov <- function(a, b, window_size, min_periods, ddof) .Call(wrap__RPolarsExpr__rolling_cov, a, b, window_size, min_periods, ddof)

RPolarsExpr$corr <- function(a, b, method, ddof, propagate_nans) .Call(wrap__RPolarsExpr__corr, a, b, method, ddof, propagate_nans)
RPolarsExpr$corr <- function(a, b, method, propagate_nans) .Call(wrap__RPolarsExpr__corr, a, b, method, propagate_nans)

RPolarsExpr$rolling_corr <- function(a, b, window_size, min_periods, ddof) .Call(wrap__RPolarsExpr__rolling_corr, a, b, window_size, min_periods, ddof)

Expand Down
5 changes: 2 additions & 3 deletions R/functions__lazy.R
Original file line number Diff line number Diff line change
Expand Up @@ -741,16 +741,15 @@ pl_rolling_cov = function(a, b, window_size, min_periods = NULL, ddof = 1) {
#' @param a One column name or Expr or anything convertible Into<Expr> via `pl$col()`.
#' @param b Another column name or Expr or anything convertible Into<Expr> via `pl$col()`.
#' @param method str One of 'pearson' or 'spearman'
#' @param ddof integer Delta Degrees of Freedom: the divisor used in the calculation is N - ddof, where N represents the number of elements. By default ddof is 1.
#' @param propagate_nans bool Used only when calculating the spearman rank correlation.
#' If `True` any `NaN` encountered will lead to `NaN` in the output.
#' Defaults to `False` where `NaN` are regarded as larger than any finite number and thus lead to the highest rank.
#' @return Expr for the computed correlation
#' @examples
#' lf = as_polars_lf(data.frame(a = c(1, 8, 3), b = c(4, 5, 2)))
#' lf$select(pl$corr("a", "b", method = "spearman"))$collect()
pl_corr = function(a, b, method = "pearson", ddof = 1, propagate_nans = FALSE) {
.pr$Expr$corr(a, b, method, ddof, propagate_nans) |> unwrap("in pl$corr()")
pl_corr = function(a, b, method = "pearson", propagate_nans = FALSE) {
.pr$Expr$corr(a, b, method, propagate_nans) |> unwrap("in pl$corr()")
}

#' Rolling correlation
Expand Down
4 changes: 1 addition & 3 deletions man/pl_corr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5818667

Please sign in to comment.