Giter Club home page Giter Club logo

Comments (4)

mahonmb avatar mahonmb commented on May 31, 2024 2

@Rekyt You're welcome. I ended up modifying fd_fdis() with my first suggestion.

Thank you (and all of your coauthors) for making this package! It has been a huge help in reducing my code run times! I have 9 regions with 10,000 simulated/randomized matrices each, so 90,000 matrices were taking days to run with the FD package! With fd_fdis(), it took an hour or two, at most.

from fundiversity.

Rekyt avatar Rekyt commented on May 31, 2024 1

One issue I'm realizing is that when the user provides only a trait dataset and no site-species dataset, the site is automatically named s1 (see below). We could use site names like s N-row for the use case described above.

library("fundiversity")

fd_fdis(traits_birds)
#>   site     FDis
#> 1   s1 133.3902

Created on 2023-08-20 with reprex v2.0.2

Should we use this behavior to be consistent? Or rather revert to site names as indices?

Do you have an opinion @Bisaloo?

from fundiversity.

Rekyt avatar Rekyt commented on May 31, 2024

Dear @mahonmb,
First of all thank you for pointing out the bug!
Second of all, thank you for suggesting a fix!

Indeed, we always thought that the input would be matrix objects but didn't realize other objects would also work with slight modifications.

I'll be fixing this behavior for all functions and include additional tests to cover it.

from fundiversity.

Bisaloo avatar Bisaloo commented on May 31, 2024

Should we use this behavior to be consistent?

This approach makes the most sense to me.

We just need to make sure that the meaning of s1, s2, etc. is clearly documented. Something like "If the sp_com argument is not provided or if it doesn't have rownames, arbitrary rownames s1, s2, s3 will be used. The @return section of the docs seems like a good place for this. We already document it in the intro vignette but it's always good to document everything in multiple places.

We might also add a message() but I'm more on the fence here. Having too many messages can be overwhelming for users.

from fundiversity.

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.