Description Usage Arguments Details Note Author(s) References See Also Examples

Calculates Etienne's *K(D,A)* using a variety of different methods

1 2 3 4 5 6 7 | ```
logkda.R(a, use.brob=TRUE)
logkda.a11(a)
logkda.pari(a, numerical=TRUE, gp_binary = "gp")
logkda.polyn(a)
logkda(a, method="pari", ...)
logkda_pari_unix(a, numerical, pari_string, gp_binary)
logkda_pari_windows(a, numerical, pari_string)
``` |

`a` |
Count object |

`use.brob` |
In function |

`numerical` |
Boolean, with default |

`method` |
In function |

`pari_string,gp_binary` |
configuration variables (not intended to be changed by the user) |

`...` |
In function |

The user should use function `logkda()`

, which is a wrapper for
the other functions. Note that the default method, `pari`

,
requires the pari/gp system to be installed. This is the preferred
option because it is much faster than the other methods.

Functions `logkda.R()`

and `logkda.pari()`

calculate
*K(D,A)* using the method appearing in Etienne (2005), supplementary
online material; they use `R`

and `pari/gp`

respectively.
Function `logkda.a11`

is a direct implementation of formula A11
in Etienne (2005). The formula is

*ommitted...see PDF*

where *\overline{s}≤ft(n_i,a_i\right)* are Stirling numbers of
the first kind (see `logS1`

).

Function `logkda.pari()`

dispatches to either
`logkda_pari_unix()`

or `logkda_pari_windows()`

but the
windows function is not guaranteed to work.

If `method`

takes its default value of “`pari`

”, and
`pari/gp`

is not installed (the test is `gp --version`

),
then the method is changed to `R`

and a warning given.

Function `logkda.a11()`

is included because the computational
method is a direct transcription of formula A11; it is very slow.

Function `logkda.pari()`

is a wrapper for
`.logkda.pari.windows()`

or `.logkda.pari.unix()`

. It uses
“`if(R.Version()$os == 'windows')`

” to check for windows
operating systems.

It would be nice to use `gp2c`

(rather than `gp`

) but I
can't make the “`-g`

” flag work properly; and I had to
hack `gp2c-run`

to make it call `gp`

with the `-q`

flag

Robin K. S. Hankin; `logkda()`

is an **R** transliteration of
`pari/gp`

code appearing in Etienne 2005 (supplementary online
material) due to Chave.

Function `logkda.polyn()`

provided by Francois Munoz.

Function `.logkda.pari.windows()`

provided by Andrea Manica and
Francois Munoz.

R. S. Etienne 2005. “A New Sampling Formula for Neutral
Biodiversity”. *Ecology Letters*, volume 8, pp253–260.
`doi: 10.111/j.1461-0248.2004.00717.x`

C. Batut and K. Belabas and D. Bernardi and H. Cohen and M. Olivier 2000. “User's guide to PARI/GP”. http://www.parigp-home.de/

1 2 3 4 5 6 7 8 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.