Comments (5)
Ah ok, thanks! We might want to add some checks that inputs are of the expected type.
from webchem.
Yup, stopifnot(is.character(query))
would be sufficient. Another option is the assertthat
package which produces friendlier error messages by default. It has zero dependencies so it would only introduce itself as a dependency if we wanted to use it. Might open a separate issue for it so we can keep track of which functions have this and which still need it. Not a huge priority I think, but probably good to do eventually.
from webchem.
Thanks for reporting this issue. Can you provide a reproducible example? (e.g., I'm not sure what mets
is in this example)
from webchem.
Aariq,
Hello - apologies for not attaching the example. It looks like I've resolved the issue - the initial upload of the compound name list was in the form of a tibble rather than a character vector, after changing the format the code seems to run as expected.
from webchem.
Thanks @bmgarcia for raising this issue! @Aariq I know we use match.arg()
for some argument types but that wouldn't work for queries. Wondering if something like stopifnot(is.character(query))
could solve this? What do you think?
from webchem.
Related Issues (20)
- Fix pkgdown config for reference HOT 3
- RI Extraction issue HOT 3
- Release webchem 1.2.0
- Common Chemistry CAS API
- Any way to search by Mass? HOT 4
- extract PubChem section's content HOT 2
- improve reliability of `with_cts()` HOT 2
- Use `httptest` for API mocking HOT 7
- error with etox_basic() HOT 1
- ChemIDplus has been retired HOT 4
- nist_ri() fails HOT 5
- Release webchem 1.3.0 HOT 1
- `pan_query()` still broken. Should it be made defunct for v 1.3.0? HOT 5
- Character CID that can't be coerced to numeric in `pc_prop()` results in `NA` output for all CIDs HOT 13
- cir_query doesn't return SMILES string even though it exists in PubChem HOT 2
- Improve input validation HOT 1
- Add vignettes (back?) to pkgdown website HOT 2
- pc_sect and section EPA-IRIS-Informtion HOT 2
- Get_cid pulls many CIDs, some wrong HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webchem.