You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arithmetic with yrs with functionally equivalent, but differently named, eras throws a warning as expected:
library("era")
yr(1, "BP") + yr(1, "cal BP")
#> Warning: `era(x)` and `era(y)` have different label or name parameters.#> # BP years <yr[1]>:#> [1] 2#> # Era: Before Present (BP): calendar years, counted backwards from 1950
But combining the same vectors doesn't:
c(yr(1, "BP"), yr(1, "cal BP"))
#> # BP years <yr[2]>:#> [1] 1 1#> # Era: Before Present (BP): calendar years, counted backwards from 1950
Now checks for era compatibility only happen in vec_cast() and the warnings are consistent:
library("era")
yr(1, "BP") + yr(1, "cal BP")
#> Warning: eras have different label or name parameters.#> # BP years <yr[1]>:#> [1] 2#> # Era: Before Present (BP): Gregorian years (365.2425 days), counted backwards from 1950
c(yr(1, "BP"), yr(1, "cal BP"))
#> Warning: eras have different label or name parameters.#> # BP years <yr[2]>:#> [1] 1 1#> # Era: Before Present (BP): Gregorian years (365.2425 days), counted backwards from 1950
Arithmetic with yrs with functionally equivalent, but differently named, eras throws a warning as expected:
But combining the same vectors doesn't:
Created on 2020-12-08 by the reprex package (v0.3.0)
The check currently in
vec_arith.era_yr.era_yr()
should be moved lower, to catch all instances of combination.The text was updated successfully, but these errors were encountered: