Skip to content

revdeps break after frollapply deprecation #7660

@tdhock

Description

@tdhock

#7530 breaks 2 CRAN pkgs.
since this is a deprecation, the fix should be in these other pkgs (not data.table).

examples only in https://rcdata.nau.edu/genomic-ml/data.table-revdeps/analyze/2026-03-02/PortfolioTesteR.txt

* checking examples ... ERROR
Running examples in 'PortfolioTesteR-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: calc_rolling_volatility
> ### Title: Calculate Rolling Volatility
> ### Aliases: calc_rolling_volatility
> 
> ### ** Examples
> 
> data("sample_prices_weekly")
> # Standard deviation volatility
> vol <- calc_rolling_volatility(sample_prices_weekly, lookback = 20)
> # Range-based volatility
> vol_range <- calc_rolling_volatility(sample_prices_weekly, lookback = 20, method = "range")
Error in frollapply(get(col), n = lookback, FUN = function(x) { : 
  'n' is deprecated in frollapply, use 'N' instead
Calls: calc_rolling_volatility ... eval -> frollapply -> stopf -> raise_condition -> signal
Execution halted

examples and tests in https://rcdata.nau.edu/genomic-ml/data.table-revdeps/analyze/2026-03-02/healthdb.txt

* checking examples ... ERROR
Running examples in 'healthdb-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: if_date
> ### Title: Interpret if any n elements drawn from a date vector could be
> ###   some days apart within some time span
> ### Aliases: if_date
> 
> ### ** Examples
> 
> dates_of_records <- sample(seq(as.Date("2015-01-01"), as.Date("2021-12-31"), 7), 10)
> 
> # whether there is any 3 records at least 30 days apart within 2 years
> if_date(dates_of_records, n = 3, apart = 30, within = 365 * 2)
[1] TRUE
> 
> # specified either apart or within or both
> if_date(dates_of_records, n = 2, within = 365)
Error in data.table::frollapply(x = x, n = n, align = align, FUN = function(x) sum(diff(x)) <=  : 
  'x' is deprecated in frollapply, use 'X' instead
Calls: if_date -> <Anonymous> -> stopf -> raise_condition -> signal
Execution halted

Metadata

Metadata

Assignees

No one assigned

    Labels

    revdepReverse dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions