ropensci / neotoma

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

Absent modifiers in `get_download` #192

Open SimonGoring opened 9 years ago

SimonGoring commented 9 years ago

From an email bug report:

I will use the Chimney Rock Animal Trap site as an example. When I use the get_download function, I get a warning message saying

"Warning: 
Modifiers seem absent from the taxon Martes nobilis. 
get_download will sum at depths with multiple entries to resolve the problem."

I noticed in the R documentation for this function, this warning is associated with taphonomic characteristics and you provide an example for pollen data but I am not sure how this relates to mammal data. In this case, the site I am looking at has presence/absence data for taxa and therefore the counts are all 1. But for Martes nobilis the count is 2.

Martes nobilis is actually no longer a valid name as it was synonymized withMartes americanus. Is this the issue?

I am getting this warning message for several sites with long lists of taxa and I am concerned the counts numbers will be wrong.

kcmaguire commented 9 years ago

I also get this warning message when a taxon is listed twice because there is MNI and NISP data. The result is the count number is the NISP + MNI for that taxon.

SimonGoring commented 9 years ago

Okay, I think that this might be a bit more complicated to resolve, because it means we need to rethink the way the taxa are represented in the count objects. For your purposes are NISP and MNI both 'Presence'? If so then you could just write a short function:

set_to_one <- function(x){
  x$counts[x$counts > 1] <- 1
  x
}

and then lapply on a download_list object.

It's not the prettiest solution but I think it ought to work. Would columns Martes nobilis_NISP and Martes_nobilis_MNI work? I'm not in love with it, but I'd need to think a bit more about how to make the taxon_list interact with the actual count table.

kcmaguire commented 9 years ago

For our purposes right now, we can treat NISP and MNI as presences so I can use a function to convert them but in the future it will be better to keep the original NISP and MNI information. Having two columns or two rows for taxa with NISP and MNI would work. Or an additional column that indicates if the count is an NISP or MNI, although I don't know how much of a pain this is. Thanks for your help.