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

Check for possible edge case in bcpc_query() #351

Open
Aariq opened this issue Feb 15, 2022 · 2 comments
Open

Check for possible edge case in bcpc_query() #351

Aariq opened this issue Feb 15, 2022 · 2 comments
Labels
question Issue or pull request needs more information

Comments

@Aariq
Copy link
Collaborator

Aariq commented Feb 15, 2022

@jranke fixed the way bcpc_query() parses activities and sub-activities in #348, #349 (thank you!). I think the fix relies on their always being one sub-activity for every activity, so we should look for any cases where activities have multiple sub-activities and add a test.

It may be best to just re-work the output to be a tibble (something that might be good to do anyways, #218).

@Aariq Aariq added the question Issue or pull request needs more information label Feb 15, 2022
@stitam
Copy link
Contributor

stitam commented Feb 16, 2022

I hope I'm now using the most recent version of the function.. Is this an example for the situation you mentioned @Aariq?

webchem::bcpc_query("silica gel")[[1]][c("activity", "subactivity")]
#> $activity
#> [1] "insecticides"
#> 
#> $subactivity
#> [1] "desiccant insecticides; inorganic insecticides"

Created on 2022-02-16 by the reprex package (v2.0.1)

@Aariq
Copy link
Collaborator Author

Aariq commented Feb 16, 2022

Exactly. So it looks like it's not "broken"—the activity and subactivity vectors will be the same length—but could be better as a tibble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issue or pull request needs more information
Projects
None yet
Development

No branches or pull requests

2 participants