Giter Site home page Giter Site logo

When maxresults is > 10000, R writes 1e+05 , and hence the url is not working. Don't fix that for me. Moreover, using "100000" solves it. about rgbif HOT 4 CLOSED

ropensci avatar ropensci commented on August 17, 2024
When maxresults is > 10000, R writes 1e+05 , and hence the url is not working. Don't fix that for me. Moreover, using "100000" solves it.

from rgbif.

Comments (4)

sckott avatar sckott commented on August 17, 2024

hmmm, tried today, not sure how to fix this

from rgbif.

dmcglinn avatar dmcglinn commented on August 17, 2024

Hey Scott,

I did a little experimenting and I think the way to fix it may be to simply add an as.integer() to the declaration of maxresults on the args object. The problem occurs when the function getForm() attempts to communicate with the gbif api. If maxresults is not an integer because R has converted it to 1e6 for example then this will raise an exception error.

I think you could solve this problem by doing the following, in the function occurrencelist()

When args is created do the following:
args <- compact(list(scientificname = scientificname, dataproviderkey = dataproviderkey,
...,
stylesheet = stylesheet, maxresults = as.integer(maxresults)))

This seems to fix the problem for me.

from rgbif.

sckott avatar sckott commented on August 17, 2024

Hey @dmcglinn , thanks for figuring this out! I will do that right away.

from rgbif.

sckott avatar sckott commented on August 17, 2024

Should be fine now, e..g, do

occurrencelist(scientificname = 'Accipiter erythronemius', coordinatestatus = TRUE, maxresults = 10^2)

from rgbif.

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.