GithubHelp home page GithubHelp logo

is.na > 1 error about webchem HOT 5 CLOSED

bmgarcia avatar bmgarcia commented on July 18, 2024
is.na > 1 error

from webchem.

Comments (5)

Aariq avatar Aariq commented on July 18, 2024 1

Ah ok, thanks! We might want to add some checks that inputs are of the expected type.

from webchem.

Aariq avatar Aariq commented on July 18, 2024 1

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.

Aariq avatar Aariq commented on July 18, 2024

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.

bmgarcia avatar bmgarcia commented on July 18, 2024

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.

stitam avatar stitam commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.