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

Error with intchron(c("intimate", "nrcf", "oxa")) #13

Open
dirkseidensticker opened this issue Sep 3, 2021 · 1 comment
Open

Error with intchron(c("intimate", "nrcf", "oxa")) #13

dirkseidensticker opened this issue Sep 3, 2021 · 1 comment

Comments

@dirkseidensticker
Copy link

While working on ropensci/c14bazAAR#147 in order to close ropensci/c14bazAAR#115 I tried to extract all databases hold in Intchron. But only egyptdb and sadb were returned

>   intimate <- intchron(c("intimate"))
Error in data.frame(..., check.names = FALSE) : 
  arguments imply differing number of rows: 2501, 0
>   nrcf <- intchron(c("nrcf"))
Error in data.frame(series_type = .x$series_type, purrr::map_dfc(.x$data,  : 
  arguments imply differing number of rows: 1, 0
>   oxa <- intchron(c("oxa"))
Error in data.frame(series_type = .x$series_type, purrr::map_dfc(.x$data,  : 
  arguments imply differing number of rows: 1, 0

In order to write a c14bazAAR parser, I want to check to what degree the returned fields are different from one db to the next. Thus far, I found that egyptdb contains also dynasty and reign; small background detail.

Would you consider this issue to be somewhere on my side or can you replicate the error? I am running v0.1.0.9000

@joeroe
Copy link
Owner

joeroe commented Sep 3, 2021

Thanks, I can replicate this. I will have to look into it further, but since there is not a general problem with parsing e.g. ORAU records:

rintchron::intchron("oxa", countries = "France")
#> # A tibble: 77 × 19
#>    record_site           record_country record_name record_longitude record_latitude
#>    <chr>                 <chr>          <chr>                  <dbl>           <dbl>
#>  1 Balloy                France         Balloy                  3.17           44.4 
#>  2 Beaurieux, Les Greves France         Beaurieux,…            49.4             3.74
#>  3 Beaurieux, Les Greves France         Beaurieux,…            49.4             3.74
#>  4 Beaurieux, Les Greves France         Beaurieux,…            49.4             3.74
#>  5 Beaurieux, Les Greves France         Beaurieux,…            49.4             3.74
#>  6 Beaurieux, Les Greves France         Beaurieux,…            49.4             3.74
#>  7 Beaurieux, Les Greves France         Beaurieux,…            49.4             3.74
#>  8 Bourbonne-les-Bains   France         Bourbonne-…             5.75           48.0 
#>  9 Bourbonne-les-Bains   France         Bourbonne-…             5.75           48.0 
#> 10 Bourbonne-les-Bains   France         Bourbonne-…             5.75           48.0 
#> # … with 67 more rows, and 14 more variables: series_type <chr>, labcode <chr>,
#> #   longitude <dbl>, latitude <dbl>, sample <chr>, material <chr>,
#> #   species <chr>, d13C <dbl>, r_date <int>, r_date_sigma <int>, qual <chr>,
#> #   F14C <dbl>, F14C_sigma <dbl>, refs <chr>

Created on 2021-09-03 by the reprex package (v2.0.0)

My guess that this is due to records that are malformed or have an unexpected structure. The response parser generally makes too many assumptions (see #11), so errors like this are inevitable as the IntChron data changes...

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

2 participants