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

Empty Etox tables #227

Closed
andschar opened this issue Mar 24, 2020 · 3 comments
Closed

Empty Etox tables #227

andschar opened this issue Mar 24, 2020 · 3 comments
Assignees

Comments

@andschar
Copy link
Contributor

The following call returns an error because the table doesn't contain any data:

etox_basic(99015)

https://webetox.uba.de/webETOX/public/basics/stoff.do?language=en&id=99015
The code breaks here.
Maybe we could add something like

if (inherits(tabs, 'try-error')) {
  message('ID not found! Returning NA.\n')
  return(data.frame(NA))
}

Not sure about it though.

@stitam
Copy link
Contributor

stitam commented Mar 25, 2020

I think this could work. However, this topic is related to issue #224, and PR #225. An invalid input to the etox functions should return a structure that allows subsequent vectorised extraction of elements, e.g. cas numbers in this case, so return(data.frame(NA)) might not be sufficient.

@andschar
Copy link
Contributor Author

Do we already know how many extractor functions we want to have? Currently there are cas, inchikey and smiles.

@stitam
Copy link
Contributor

stitam commented Mar 25, 2020

I think the more the better:) I am currently working on some extractors for alanwood and chebi (only cas, inchikey, smiles)

@andschar andschar mentioned this issue Mar 25, 2020
4 tasks
@stitam stitam closed this as completed in 434cd60 Mar 26, 2020
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