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

column types not consistent in etox_targets() #278

Open
Aariq opened this issue Aug 19, 2020 · 1 comment
Open

column types not consistent in etox_targets() #278

Aariq opened this issue Aug 19, 2020 · 1 comment
Assignees
Labels
bug Unexpected problem or unintended behavior consistent api Uniformity across functions and data sources good first issue Good issue for first-time contributors

Comments

@Aariq
Copy link
Collaborator

Aariq commented Aug 19, 2020

etox_targets() returns a list of data.frames (and URLs for microattribution). It is not easy to bind the data.frames together because at least the Duration column is sometimes character and sometimes integer.

> library(webchem)
> library(purrr)
> library(dplyr)
> etox_data <-etox_tests(c(8668, 8494))
Querying https://webetox.uba.de/webETOX/public/basics/stoff.do?id=8668
Querying https://webetox.uba.de/webETOX/public/basics/stoff.do?id=8494
Warning message:
In FUN(X[[i]], ...) : NAs introduced by coercion
> map(etox_data, ~pluck(.x, "res")) %>% bind_rows()
Error: Can't combine `..1$Duration` <character> and `..2$Duration` <integer>.

P.S., this would be a breaking change, but wouldn't it be better for the output to just be a single tidy dataframe with the URLs as an additional column or stored as an attribute?

@Aariq Aariq added bug Unexpected problem or unintended behavior consistent api Uniformity across functions and data sources labels Aug 19, 2020
@Aariq
Copy link
Collaborator Author

Aariq commented Aug 19, 2020

the fix is to provide read.table() with a colClasses argument at line 401. Probably also affects etox_targets()

@stitam stitam self-assigned this Mar 1, 2021
@Aariq Aariq added the good first issue Good issue for first-time contributors label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior consistent api Uniformity across functions and data sources good first issue Good issue for first-time contributors
Projects
None yet
Development

No branches or pull requests

2 participants