Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calibrating a very old date fails with an uninformative error message #39

Open
joeroe opened this issue Dec 1, 2024 · 0 comments
Open

Comments

@joeroe
Copy link
Owner

joeroe commented Dec 1, 2024

library(c14)
c14_calibrate(80000, 100)
#> <c14_cal[1]>
#> [1] c. 55000 cal BP

c14_calibrate(85000, 100)
#> Error:
#> ℹ In index: 1.
#> Caused by error in `colnames<-`:
#> ! attempt to set 'colnames' on an object with less than two dimensions

c14_calibrate(90000, 100)
#> Warning in min(above): no non-missing arguments to min; returning Inf
#> Warning in max(above): no non-missing arguments to max; returning -Inf
#> Error:
#> ℹ In index: 1.
#> Caused by error in `min(above):max(above)`:
#> ! result would be too long a vector

Created on 2024-12-01 with reprex v2.1.1

I would be better to return NA with an informative warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant