ropensci / neotoma

Programmatic R interface to the Neotoma Paleoecological Database.
https://docs.ropensci.org/neotoma
Other
30 stars 16 forks source link

`chronology.id` in `age.type` column? #197

Closed andydawson closed 9 years ago

andydawson commented 9 years ago

Not sure what is going on here, or if this is an intended update. For the sites I have tried (and maybe all sites), the chronology identification number now appears in the age.type column instead of the chronology.id column in the objects returned by get_download.

For example:

foo = get_download(3031)

> foo[[1]]$sample.meta[1:4,]
    depth thickness age.older age age.younger dataset.id                 chronology.name age.type
2     650       0.5        NA -25          NA     NAPD 2 Calibrated radiocarbon years BP     5317
210   662       0.5        NA -13          NA     NAPD 2 Calibrated radiocarbon years BP     5317
3     670       0.5        NA   0          NA     NAPD 2 Calibrated radiocarbon years BP     5317
4     680       0.5        NA  22          NA     NAPD 2 Calibrated radiocarbon years BP     5317
    sample.id chronology.id unit.name
2       56805            NA        NA
210     56807            NA        NA
3       56809            NA        NA
4       56811            NA        NA

> foo[[1]]$chronologies[[1]][1:4,]
  age.older age age.younger     dataset.id      chronology.name age.type chronology.id
1        NA   0          NA COHMAP chron 1 Radiocarbon years BP     1353            NA
2        NA  21          NA COHMAP chron 1 Radiocarbon years BP     1353            NA
3        NA  36          NA COHMAP chron 1 Radiocarbon years BP     1353            NA
4        NA  54          NA COHMAP chron 1 Radiocarbon years BP     1353            NA

Is this intentional?

SimonGoring commented 9 years ago

Yeah, that's a bug. I'm not sure why it's happened all of a sudden, although I suspect it comes from differences in the API between different data set types. I need to double check, but I thought I tried to fix this by using explicit calls to the column names. The problem is clearly that dataset.id is getting the wrong information, and then everything is shifted over. I'll try to fix this ASAP.

andydawson commented 9 years ago

Thanks @SimonGoring. I'm also confused by this one!

SimonGoring commented 9 years ago

This is now resolved by commit 83e7441. I've added tests to ensure it won't happen again. Use install_github('ropensci/neotoma) and everything should be fine.

andydawson commented 9 years ago

Awesome, that was fast! Can you fix all my other (non-neotoma) problems too? :)

SimonGoring commented 9 years ago

Easy. Fixed in commit 83838828282838383838191291291921929191919192191912491291249239234293492349ddd912312391239123912312. You just have to figure out which repository I used :)

On Tue, Jul 14, 2015 at 9:12 PM, Andria Dawson notifications@github.com wrote:

Awesome, that was fast! Can you fix all my other (non-neotoma) problems too? :)

— Reply to this email directly or view it on GitHub https://github.com/ropensci/neotoma/issues/197#issuecomment-121459270.