PIFSCstockassessments / ageproR

Prototype R package interface for AGEPRO (Age Structure Projection Model) using the JSON data format.
GNU General Public License v3.0
1 stars 0 forks source link

tibble::as_tibble.matrix deprecation warning (,name_repair) #44

Closed efletcherPIFSC closed 3 months ago

efletcherPIFSC commented 5 months ago

recruit_model matirix vectors fields are printed to R console via tibble::as_tibble.matrix . Deprecation warning shows that calls to tibble::as_tibble.matrix needs the .name_repair parameter to be set.

> test$recruit$recruit_data[[1]]$observations <- as.matrix(c(1,1))
> test$recruit$recruit_data[[1]]
ℹ Empirical Recruitment Distribution
• Has SSB?  FALSE
• Number of Recruitment Data Points: 0
ℹ Observations:
  # A tibble: 2 × 1
       V1
    <dbl>
  1     1
  2     1
Warning message:
The `x` argument of `as_tibble.matrix()` must have unique column names if `.name_repair` is omitted as of tibble 2.0.0.
ℹ Using compatibility `.name_repair`.
ℹ The deprecated feature was likely used in the ageproR package.
  Please report the issue to the authors.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated. 
> lifecycle::last_lifecycle_warnings()

Solution

Goto recruit_model to find all tibble::as_tibble.matrix calls and add .name_repair = "minimal" parameter