Squashed commit of the following:

commit b0dde2c6e4e9d415a56e3fa62740a036a515bd7f
Merge: abb5b0b 1391a30
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Wed Sep 24 11:42:01 2014 +0300

    Merge pull request #43 from jarioksa/veganify-dispweight

    Veganify dispweight

commit 1391a306e31808f4a901d3078764aeadc1eb3461
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Wed Sep 24 10:10:27 2014 +0300

    more detailed authors information for [g]dispweight

commit d688532098d63fbc1faaed66905a13a1eb1230e6
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Wed Sep 24 10:09:58 2014 +0300

    tweak formatting of dispweight summary

commit 3d8b06a476222e8b13ff46a26fad9d5234c6fc8c
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Wed Sep 24 09:57:34 2014 +0300

    edit man/dispweight.Rd

commit 6ce39e51e152f8d3397eb785a446c56ccbf3aaa5
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Tue Sep 23 17:11:05 2014 +0300

    gdispweight cannot handle missing values and fails informatively

    dispweight already fails informatively from nullmodel

commit 6a9d84eb91ab157fc4d430d9d4d54b4a570d51b6
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Tue Sep 23 07:23:26 2014 +0300

    print.summary.dispweight passes ... to printCoefmat

commit 6d5eea1d530fb2131bfb13ea7ff3f1a841e4933a
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Mon Sep 22 21:39:40 2014 +0300

    avoid using anonymous functions in sapply() within gdispweight

commit 704d4c2f3879fd2ffa77cc8ea70df01d331a68ee
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Mon Sep 22 16:42:05 2014 +0300

    add summary.dispweight to extract and print simulation results

commit 00a68c93498e53b0a6bfe967744ecbf90f1dd372
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Mon Sep 22 16:15:44 2014 +0300

    dispweight returns the name of the nullmodel

commit c9b929181efe901d0483e3ed9b07d0e9830d3d1e
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Mon Sep 22 12:47:54 2014 +0300

    dot expansion of terms works in gdispweight(comm ~ ., data=<data>)

commit 02f947d8ac0dadcfafb422e42e2747d5eebede70
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Mon Sep 22 11:07:41 2014 +0300

    [g]dispweight returns attribute on degrees of freedom used ("df")

    gdispweight finds d.f. directly from glm() and this is normally
    constant for all species, but dispweight discards factor levels where
    species does not occur, and degrees of freedom is non-constant for
    species. The d.f. is used to divide the Pearson Chi-square to get
    the overdispersion, and because d.f. is reduced for some species in
    dispweight, these will get higher overdispersion and hence lower
    weight in dispweight than in gdispweight. With this commit, the
    same original Pearson Chi-square will be found for both dispweight
    and gdispweight object:

    attr(object, "D") * attr(object, "df")

commit 99f9a6bc2e2849bb7319157839e69866968b3bd6
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Mon Sep 22 10:53:06 2014 +0300

    export gdispweight from the NAMESPACE

commit 94a0d4349256b423c2a7e9066a73d4216f44e656
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sun Sep 21 20:41:51 2014 +0300

    Update author information for dispweight + gdispweight

    I think that email address of Eduard Szöcs also was out of date.

commit 87391813102ed27cadd0986fd8b78ed72d3293fd
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sun Sep 21 20:32:00 2014 +0300

    Introduce generalized (parametric) dispersion weighting

    This is a new unpublished method. Original method uses Pearson
    Chi-square for a Poisson model with one factor and assesses the
    significance using multinomial simulation ("c0_ind" nullmodel).
    The new method estimates the same Pearson Chi-square for any glm
    model and evaluates the significance parametrically. Otherwise the
    models are identical except that the original method ignores
    completely the factor levels where species in assessing the number
    of degrees of freedom, but the generalized method defines the
    degrees of freedom in a standard way (number of observations minus
    number of model coefficients). As the degrees of freedom is used as
    divisor for weights, this will influence the strength of downweighting.

commit 37f5261e2f2933c90c6521f6c258c1a850a3426b
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sun Sep 21 08:50:24 2014 +0300

    Relax data requirements in dispweight: reject only binary models

    The test of data properties was moved to checking properties of
    defined nullmodel, and only binary null models are rejected (these
    would all have p=1). We now accept also non-integer quantitative
    data. I don't know if these make sense, but that is none of my
    business -- users decide.

commit f4d1394fd7216effef1b3670974b44627b2fc08c
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sun Sep 21 08:38:45 2014 +0300

    dispweight handles 1-level 'groups': analysis wrt community mean

commit 9092774c0f46c177a6ca4ce254478e4a348141fb
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sun Sep 21 08:28:21 2014 +0300

    Expose nullmodel and plimit as user arguments in dispweight

commit 21e0362b1f7ee3ae101684466921b59919008b89
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sun Sep 21 08:24:11 2014 +0300

    adapt docs to 999 simulations of commit 67adb96

commit 67adb967a5d13bc439cfa52844dc4fb9f10cd0c9
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sun Sep 21 08:17:05 2014 +0300

    default to 999 simulations in dispweight

commit 7ba5092c9bbbd6519fdba2c1e590e9f4f5000e64
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sun Sep 21 08:08:22 2014 +0300

    major rewrite of dispweight: rethink, streamline & use vegan::nullmodel

    The function was completely rewritten to use vegan::nullmodel
    "c0_ind" which is equal to the simulation used in the original
    function. The original function looped over species, but  now we
    perform simulation for all species simultaneously using nullmodel,
    and loop over levels of 'groups'. All code that could be moved
    out of this loop was moved, and calculation of 'dhat' statistics
    was refactored and streamlined -- and done outside the loop.

    There are not many unchanged lines, but the results are equal provided
    the 'p' values are on the same side of the fixed critical level.

    In my laptop, this is also about 3x faster than the original.

commit 824de6ca248a29faa0290b4f4fda8b7ef9aa3994
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sat Sep 20 08:54:09 2014 +0300

    remove empty levels from "groups" or dispweight fails cryptically

    Error in if (any(means == 0)) { : missing value where TRUE/FALSE needed

commit 70277611eacc86153d56cac101f076d547bf3666
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sat Sep 20 08:45:20 2014 +0300

    dispweight used arg 'group', but other vegan functions use 'groups'

commit ae6c6af97b7a033e85931ba9801d5cf8db8c074f
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Fri Sep 19 08:45:15 2014 +0300

    dispweight doc says that it is 'nsimul' (not 'nperm')

commit cd129e362142ba2b4b08d70a2da1a4710c9e6c85
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Fri Sep 19 08:40:57 2014 +0300

    document that dispweight returns transformed data

commit 8087340689d133b6dd5b34aae136452687a99984
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Tue Aug 6 17:37:36 2013 +0300

    check that input are integers, fix docs

commit bff23ee508a7338503f9ac2eb7280bf0217e0432
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Tue Aug 6 16:53:46 2013 +0300

    dispweight does simulations, not permutations

commit 7d5a6ed8828ead61c81b6b4f9ebe9d651253f8c7
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Mon Aug 5 08:55:18 2013 +0300

    all dispweights return transformed data (with attributes)

commit 6b6a47b9dd16bc0421103a0900f659f15d7f8bc8
Author: Jari Oksanen <jari.oksanen@oulu.fi>
Date:   Sun Aug 4 09:04:39 2013 +0300

    dispweights work without 'group' argument

git-svn-id: svn://svn.r-forge.r-project.org/svnroot/vegan@2888 edb9625f-4e0d-4859-8d74-9fd3b1da38cb