Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Community similarity in Frescalo #187

Open
AGAuffret opened this issue Nov 15, 2019 · 0 comments
Open

Community similarity in Frescalo #187

AGAuffret opened this issue Nov 15, 2019 · 0 comments

Comments

@AGAuffret
Copy link

Hello,
I was interested in trying to use community similarity (rather than environmental similarity) for creating the site weights for the Frescalo analysis, as Hill (2012) does. I implemented it locally quite simply in the createWeights() function, first adding an argument to the function choosing the similarity method (with Euclidean as default to preserve current functionality):

createWeights<-function (distances, attributes, sim_method="euclidean", dist_sub = 200, sim_sub = 100, normalise = FALSE)

Then replacing the current method using the dist() function with vegan's vegdist():

sim_distance <- vegdist(attributes[, 2:length(names(attributes))], method=sim_method, diag=TRUE, upper=TRUE)

I also added a relevant check to errorChecks() regarding choice of distance function, and I guess vegan would need to be added to the dependent packages.

Is this something useful enough that you might be interested in implementing into the package? If I can manage to work out how to do pull requests properly then I'm happy to try it, but I'm also open to you maintainers doing it yourselves.

Thanks,
Alistair

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants