Giter VIP home page Giter VIP logo

pez's People

Contributors

mrhelmus avatar willpearse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pez's Issues

PGLMM cleanning

  • Swap the random effect variance components so they're correct
  • Make interface with comparative.comm neater (...or at least write a wrapper :p)
  • Remove plotrix dependency

Check handling of missing species

...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

Phylogenetic metric statistics

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

Making repo public

@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!...

Compatibility with comparative.data

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.

Phylosor produces a similarity matrix

...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.

Re-check unit tests

  • Check that metric are the same value as before, although obviously the return values will have altered
  • Make some for PGLMM so that you can \dontrun everything (and thus satisfy CRAN)
  • Write new tests for .internal metrics

New wrappers and classes for metrics

  • Dispersion's output is no longer phy.structure, and I think this could be removed. Either get rid of it entirely, or at least have dispersion return a list with coefs and the randomisations (make similar to issue #45 and its way of handling simulations)
  • Need a general interface to all the underlying metric .name functions, and a help file for them
  • Consider what you're going to have as the 'general' name for everything; I sense no change but consider it at least!...

Remove dependency on picante in null model sims

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...

Add PGLMM to vignette

...if anyone else wants to do it I'd be more than happy; my brain is a tad fried :D

Revise manuscript

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.

Get through R CMD check

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?

Flexible phylo vs. trait distance matrices

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.

Pst

...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.

Example where `shape(cc)` fails

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.

D vs Dc vs functioning code

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.

Odds and ends before v1.1

  • New version of scape
  • Other new functions?
  • Flag INND changes in new version (helpfile, changelog)
  • Check help docs:
    • notes in shape going onto multiple paragraphs
    • PGLMM wrapper needs updating
    • ...likely many more

Editing cc objects

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

ConDivSim does not work

...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

Final documentation check

Make sure all functions are documented, and that the vignette tells a coherent story that touches on everything.

The vignette isn't being found

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).

Discussion about facilities for distance matrices

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?

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.