Function to generate an integer sequence representing the lengths of nested samples of sample
Usage
divsamplenum(ms, n)
Arguments
ms
the main sample, either as a 2-column data.frame (species ID, count of species), or a vector of species IDs.
n
desired number of nested samples (integer)
Details
This function produces the default list of nested sample lengths for the DivE algorithm. For the vector representation of the main sample (ms) it is equivalent to sort(round(seq(from=length(ms)/n, to=length(ms), by=length(ms)/n)), decreasing=TRUE).
Value
A decreasing sequence of nested sample lengths.
Author(s)
Daniel Laydon, Aaron Sim, Charles Bangham, Becca Asquith
References
Laydon, D., Melamed, A., Sim, A., Gillet, N. A., Sim, K., Darko, S., Kroll, S., Douek, D. C., Price, D., Bangham, C. R. M., Asquith, B., Quantification of HTLV-1 clonality and TCR diversity, PLOS Comput. Biol. 2014
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DivE)
Loading required package: deSolve
Attaching package: 'deSolve'
The following object is masked from 'package:graphics':
matplot
Loading required package: FME
Loading required package: rootSolve
Loading required package: coda
Loading required package: rgeos
rgeos version: 0.3-19, (SVN revision 524)
GEOS runtime version: 3.5.0-CAPI-1.9.0 r4084
Linking to sp version: 1.2-3
Polygon checking: TRUE
Loading required package: sp
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DivE/divsamplenum.Rd_%03d_medium.png", width=480, height=480)
> ### Name: divsamplenum
> ### Title: divsamplenum
> ### Aliases: divsamplenum divsamplenum.default
> ### Keywords: diversity
>
> ### ** Examples
>
> require(DivE)
> data(Bact1)
>
> divsamplenum(Bact1, 3)
[1] 7814 5209 2605
> divsamplenum(Bact1, 6)
[1] 7814 6512 5209 3907 2605 1302
>
>
>
>
>
>
> dev.off()
null device
1
>