willpearse / pez Goto Github PK
View Code? Open in Web Editor NEWPhylogenetics for the Environmental Sciences
License: GNU General Public License v3.0
Phylogenetics for the Environmental Sciences
License: GNU General Public License v3.0
sobbing sound
...adding lines through the permutation distribution histogram to see observed values
Eric Lind
plotrix:::dispersion
and pez:::dispersion
interfearing with one another.
Unit tests and vignette entry
...this is harder than it sounds, since it requires ~major alterations to how the JCB regression framework works (...which, in turn, requires a paper...)
Eric Lind
To make @cavender happy :D
Suggestion by Eric Lind
...no longer dropped in shape, because I don't think they should be in the matrix full stop. Would also stop some errors with pglmm; check comparative.comm
...people seem to want to do a regression of something about environment, and the dist functions exist in pez. It will need consideration, because this is subtly (but importantly) different to an eco.env.regression...
Supply a wrapper around picante's (...or others'...) null communities to calculate shape, evennes, etc. under these nulls.
...should be easier now you've removed the phy.structure return values for these classes
@mrhelmus @stevencarlislewalker @cmtucker This would make it easier for others to submit feature requests etc., but at present would mean everyone would see comments and discussion in the issues.
Would you rather I (1) just made this public, or (2) deleted this repo (and all the discussion), then made a new 'pez' repo in its place?
Sorry for yet more GitHub spam!...
Rename comaparative.comm$traits to comaparative.comm$data, add 'comparative.data' to the end of the S3 class for comparative.comm objects, and everything's compatible.
...which will confuse users, since the others generate dissimilarity matrices. I'm going to flip it round to be a dissimilarity matrix, and flag it heavily in the help file.
...abundance only in dispersion and dissimilarity, obviously
...because you now have the MNTD and MPD versions...
...requires implementing colless' index, but that's fairly reasonable
This will remove the only 'note' in the package check. For reasons here (http://r-pkgs.had.co.nz/src.html) I don't think this is a true 'issue' as picante exports the code (thus it's a static library, and thus we can link against it) but there's really no need to have an error message flag up if we don't have to have it do it.
I will try and use replacement functions in vegan, or (frankly) write something in C if it is that much quicker. It would, in many ways, be preferably to continue using picante for compatibility. Perhaps The Wrath of Ripley will force us, anyway...
...if anyone else wants to do it I'd be more than happy; my brain is a tad fried :D
I've uploaded a manuscript to a new branch. Take a look at it, and if you want to make changes beyond leaving comments (i.e., you want to alter text) then please branch and make those changes. I will then merge them into the main thread.
Please have a quick final test of the code. I think it works, but you (Caroline) are the one who knows best :D
I think it would be a good idea to have as many of us be able to get through R CMD check on our own machines. This will really help avoid getting Ripley'd, and is a good idea as far as reducing the number of users who could be potentially frustrated. Also maybe submit to WinBuilder before submitting to CRAN?
...I have a memory you wanted these deleted. If that's the case just comment below and I'll handle it.
Have a scalar for all metrics that splits between a trait and a phylo distance matrix (where possible!) and can give a vector for differetn values --> list of all the different metrics under that. Use Steve's phylo fun dist function to calculate.
...because it's a bit weird!
...doesn't pass any tests. I sense it never worked; we should either use spacodiR code, or just drop the metric. I intend to merge spacodiR in, but will put this as low-priority.
library(pez)
library(picante)
library(ape)
set.seed(1)
n <- 8 # number of sites
m <- 5 # number of species
env <- data.frame(x1 = rnorm(n), x2 = rnorm(n))
rownames(env) <- letters[1:n]
traits <- data.frame(z1 = rnorm(m), z2 = rnorm(m))
rownames(traits) <- LETTERS[1:m]
newick <- "((A,(B,E)),(D,C));"
tree <- chronos(compute.brlen(read.tree(text = newick)))
comm <- matrix(rbinom(n*m, 1, 0.8), n, m)
dimnames(comm) <- list(rownames(env), rownames(traits))
cc <- comparative.comm(tree, comm, traits, env)
shape(cc)
Gives the error:
Cmatrix[species, species] : incorrect number of dimensions
But it looks like the issue is on the picante
side. For example, this fails in the same way,
psd(comm, tree)
But this doesn't,
psd(comm, vcv(tree))
As always I could be missing something.
...or perhaps make some measure of 'signal' for them. Dc would work, but that publication is (still) not out yet :-(
I think I should remove Dc, as there's no citation for it yet, and just replace it with plain old-fashioned D. I also think allowing abundances to be included (which is what Dc does) is muddying the water. This may also be why the tests fail!...
I should email David Orme to see if he would be OK with Dc being in pez anyway, seeing as how D is in caper. Maybe I'm being too polite.
...which is causing build problems for CRAN. Potentially we should just cut PVR, or just do the decomposition ourselves (it's just a PCA, right?)
We need sometihng in the vignette that tells people how/that they can alter an object afterwards in a lightweight fashion.
We may also need some convenience wrappers, of various levels of complexity depending on what we decide later
...can whoever wrote it please fix it?
> data(laja)
> data <- comparative.comm(invert.tree, river.sites, invert.traits)
> ConDivSim(data)
Error in rep(0, NbSp - locrich) : invalid 'times' argument
metapop.sim
cleaning taxonomy (?)
Make sure all functions are documented, and that the vignette tells a coherent story that touches on everything.
I'm probably being boneheaded but vignette("pez-intro")
comes up with nothing for me (even without my standard problem of using --no-build-vignettes
).
See for example: git diff FPD master -- R/dist.matrix.R
Because functional-phylogenetic diversity is based on a combination of functional (i.e. trait) distances and phylogenetic distances, I would like to sort out how pez
will handle distance matrices in general. This might also be worthwhile regardless of the functional-phylogenetic stuff.
How do we feel about traits.dist.matrix
/ traits.dist.numeric
enforcing Euclidean distances? It seems too restrictive in my opinion, but maybe I haven't sufficiently thought through it. Similarly, why are only continuous traits allowed? Why can't we just use distance matrix facilities from other packages? I think I would recommend something more flexible like traits.dist <- function(., dist.function = dist)
. I'm also leaning towards using a phylo.dist
generic, which will operate similarly. In this way, we could have func.phylo.dist <- function(., traits.dist.function = dist, phylo.dist.function = cophenetic, ...)
. One potential issue here is the inconsistency across packages for when dist
and matrix
objects are used to represent distance matrices.
Thinking out loud here. Thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.