GithubHelp home page GithubHelp logo

Comments (4)

rhijmans avatar rhijmans commented on August 10, 2024

If you look at the first example, you see that evaluate only uses arguments p and a, both a vector.

from dismo.

stragu avatar stragu commented on August 10, 2024

Looking at the function definition, I guess I hit the case when x is missing and a and p are not vectors. In this particular case, it goes to the else branch and will use the model to predict. Hence my question.

library("dismo")
# with matrices instead
p <- matrix(rnorm(50), ncol = 2)
a <- matrix(rnorm(50), ncol = 2)
e <- evaluate(p=p, a=a)

Error in predict(model, data.frame(p), ...) :
argument "model" is missing, with no default

I guess the rest of the documentation does hint at that, but the description of the model argument got me confused as I took it on its own. Should it say "Not used when x is missing (and both a and p are vectors)"?

from dismo.

rhijmans avatar rhijmans commented on August 10, 2024

Thanks for the clarification. I regret the way I designed this function. It is too complex, it should have been at least two functions. (even if it is not as bad as stats::reshape). I have updated the docs per your suggestion.

from dismo.

stragu avatar stragu commented on August 10, 2024

No problem, thank you for the prompt reply! And thank you for all your work for R Spatial πŸ‘ :)

from dismo.

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.