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

Enable all fields to be returned with get_c14data() #148

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

Enable all fields to be returned with get_c14data() #148

dirkseidensticker opened this issue Sep 2, 2021 · 1 comment

Comments

@dirkseidensticker
Copy link
Contributor

At the moment, fields not defined within the c14datelist are removed, but in some cases the additional fields are needed for analysis. As an example, aDRAC now contains a CLASS field that contains information on the reliability of each date. This field is crucial in order to properly filter the db.

Thus: what do you think about adding an option that returns the c14datelist + appended remaining fields? Something like get_c14data(c("adrac", "all"))?

@nevrome
Copy link
Member

nevrome commented Sep 3, 2021

Sounds like a good idea to me!

We may have to read the additional variables as strings, though, and then apply automatic type inference later. Otherwise adding additional variables would probably mess up our type enforcement pipeline.

Another issue are structurally more complex databases, where you could merge in a lot of additional variables from different tables. If we want to get everything that's somehow relevant, then we have to look deeper into these datasets.

For the interface I would only add a simple switch all_variables = FALSE to all getter functions. Of course we could come up with something to turn the additional variables on for individual databases in get_c14data, but I think this would just make it unnecessary complicated. If you for example want to have some databases without all vars, and one with, then you can work with multiple calls to get_c14data and fuse:.

fuse(
  get_c14data("adrac", all_variables = T),
  get_c14data(c("calpal", "eubar"))
)

Btw. we could use an ellipsis for get_c14data, now that I think about it.

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

No branches or pull requests

2 participants