Comments (6)
Simon, is it failing if you use the development version of ecodist (installed from github)?
The version on CRAN does not have the fix I added, but the development version will be sent to CRAN within the next week or so with assorted new improvements, including a (less than ideal) fix for the package that overwrites the dist method.
from ecodist.
To document this more fully, the cause of the error is in the proxy package (thanks to Peter Dalgaard for tracking that down):
proxy::dim.dist, changes the default behavior of dim()
The maintainer of proxy is working on a update that removes the non-standard behavior; the main reason I didn't push the update to CRAN is that I was hoping the fix to proxy itself would come about soon.
The function I added to the development version of ecodist returns the dim.dist behavior to the base default, but only if ecodist is loaded after proxy. This may then break proxy, but that wasn't a big concern of mine.
Unfortunately, since it comes from a different loaded package, it isn't something I can actually fix completely. Here's hoping for a proxy update.
from ecodist.
(responding to your previous post): ooh sorry yeah I didn't try to install the github version ; i didn't get you added something in the dev version as i just saw that the OP closed the issue after saying the workaround was working for him... will give it a go as soon as I have time! thanks for all the good work anyway!!
from ecodist.
Hi,
That's most likely the same problem as reported here: https://stackoverflow.com/questions/68310302/incorrect-dimensions-error-with-the-function-mrm-in-the-package-ecodist
It appears to be caused by having other packages loaded, notably spdep. MRM() works correctly in a vanilla R session on CRAN, and on every platform I have available to test on.
I have not, however, been able to figure out exactly what is going on and come up with a way to fix it. It's something to do with the implicit coercion to vector within the formula interface.
There is a work-around, though, which is to explicitly coerce the distance objects to vectors before using MRM (here then to data frame columns for convenience).
# Explicit conversion to vector
graze.d <- with(graze, data.frame(LOAR10 = as.vector(dist(LOAR10)), sitelocation = as.vector(dist(sitelocation)), forestpct = as.vector(dist(forestpct))))
MRM(LOAR10 ~ sitelocation + forestpct, data=graze.d, nperm=10)
from ecodist.
Hi sgoslee,
It works perfectly with the work-around code, thank you for your prompt assistance.
Best,
Guillaume
from ecodist.
Hello! should this issue really be closed? I understand it's not a problem from the package but it still happens (it's happening to me while trying to do some mantel test). Maybe it should stay open until the (terrible) package that manipulates dist
in such a bad way stop doing that, or that the workaround (using the vector instead of distance did solve the problem for me to!) is somehow implementend if/when needed? I didn't have time too look more carefully if it's indeed the fault of sdep
for me too (wouldn't be suprise tho) but may spend a few hours on that if i can. Then i can maybe open an issue wherever sdep issues can be open and also help looking at integrating the quick 'as.vector' patch when needed!
from ecodist.
Related Issues (4)
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 ecodist.