Title: | Timescale-Specific Variance Ratio for Use in Community Ecology |
---|---|
Description: | Tools for timescale decomposition of the classic variance ratio of community ecology. Tools are as described in Zhao et al (in prep), extending commonly used methods introduced by Peterson et al (1975) <doi: 10.2307/1936306>. |
Authors: | Daniel C. Reuman [aut, cre], Lei Zhao [aut], Shaopeng Wang [aut] |
Maintainer: | Daniel C. Reuman <[email protected]> |
License: | GPL-3 |
Version: | 1.0.2 |
Built: | 2025-02-14 03:40:51 UTC |
Source: | https://github.com/reumandc/tsvr |
tsvreq_classic
object across a set of timescales; also the constructor function
for class vreq_classic_ag
.All the components of a tsvreq_classic
object can be aggregated across an arbitrary
set of timescales, producing a new variance ratio equation - this function performs that
aggregation. The function returns a vreq_classic_ag
object, and is the constructor
function of that class. The
vreq_classic_ag
class has slots com
, comnull
, vr
, which are
the same as a vreq
object, but also has slot ts
, which is the timescales
over which aggregation was performed to get the object. The class inherits from vreq
,
which inherits from list
.
aggts(obj, ts)
aggts(obj, ts)
obj |
A |
ts |
The timescales to aggregate over |
Before aggregation is performed, the argument 'ts' is intersected with the canonical Fourier timescales greater than or equal to the Nyquist timescale, and the resulting timescales are then reflected about the Nyquist timescale. This is to account for the symmetry of Fourier transforms about the Nyquist frequency. The 'ts' slot of the output object shows the intersected, reflected timescales that were actually used for aggregation. See the examples.
aggts
returns an object of class vreq_classic_ag
. Slots are:
com |
the timescale-aggregated value of CVcom2 |
comnull |
the timescale-aggregated value of CVcomip2 |
vr |
the timescale-aggregated value of the classic variance ratio |
ts |
the timescales over which aggregation was performed |
Shaopeng Wang, [email protected]; Lei Zhao, [email protected]; Daniel Reuman, [email protected]
Zhao et al, (In prep) Decomposition of the variance ratio illuminates timescale-specific population and community variability.
tsvreq_classic
, vreq_classic_ag_methods
,
browseVignettes("tsvr")
X<-matrix(runif(10*100),10,100) h<-tsvreq_classic(X) res1<-aggts(h,h$ts[h$ts>=4]) res2<-aggts(h,h$ts[h$ts>=4 | h$ts<=4/3]) #res1 and res2 produce the same result #because of Fourier symmetry around the #Nyquist timescale - see Details
X<-matrix(runif(10*100),10,100) h<-tsvreq_classic(X) res1<-aggts(h,h$ts[h$ts>=4]) res2<-aggts(h,h$ts[h$ts>=4 | h$ts<=4/3]) #res1 and res2 produce the same result #because of Fourier symmetry around the #Nyquist timescale - see Details
This function is used to calculate the cospectra between pairs of time series, including each time series with itself. These are based on simple ffts without smoothing.
cospect(X)
cospect(X)
X |
a matrix with counts or densities arranged in species by time step. |
cospect
return a list with elements
frequency |
a vector from 0 to 1 of the frequencies used |
cospectrum |
a 3D array, with cospectrum range in species by species by frequency |
Lei Zhao, [email protected]; Daniel Reuman, [email protected]
X<-matrix(runif(200,1,100), 10, 20) ans<-cospect(X)
X<-matrix(runif(200,1,100), 10, 20) ans<-cospect(X)
Calculates various measures of population and community variability
cv2(X, type)
cv2(X, type)
X |
A matrix with counts or densities arranged in species by time step |
type |
If |
cv2
returns the value of population or community variability.
Lei Zhao, [email protected]; Daniel Reuman, [email protected]; Shaopeng Wang, [email protected]
Zhao et al, (In prep) Decomposition of the variance ratio illuminates timescale-specific population and community variability.
vreq_classic
, vreq_LdM
, cv2f
, browseVignettes("tsvr")
X<-matrix(runif(200,1,100), 10, 20) ans<-cv2(X, type="com")
X<-matrix(runif(200,1,100), 10, 20) ans<-cv2(X, type="com")
Compute a frequency-specific version of CVcom or CVcomip.
cv2f(X, type)
cv2f(X, type)
X |
A matrix with counts or densities arranged in species by time step |
type |
If |
cv2f
returns an object of type list consisting of
frequency |
a vector from 0 to 1 (not including 0 and 1) |
cv2 |
A vector of frequency-specific population or community variability |
Shaopeng Wang, [email protected]; Lei Zhao, [email protected]; Daniel Reuman, [email protected]
Zhao et al, (In prep) Decomposition of the variance ratio illuminates timescale-specific population and community variability.
tsvreq_classic
, cv2
, browseVignettes("tsvr")
X<-matrix(runif(200,1,100), 10, 20) ans<-cv2f(X, type="com")
X<-matrix(runif(200,1,100), 10, 20) ans<-cv2f(X, type="com")
Error check a data matrix.
errcheck_data(X, calledby)
errcheck_data(X, calledby)
X |
a matrix with counts or densities arranged in species by years. No NAs or negative values allowed, constant species not allowed. |
calledby |
the function calling this one |
errcheck_data
returns nothing but throws and error if the inputs do not
meet the requirements
Daniel Reuman, [email protected]
tsvreq
class.Error check inputs for the creator function for the tsvreq
class.
errcheck_tsvreq(ts, com, comnull, tsvr, wts)
errcheck_tsvreq(ts, com, comnull, tsvr, wts)
ts |
Timescales, should be a numeric vector of nonnegative numbers |
com |
Should be a vector of nonnegative numbers, equal to |
comnull |
Should be a vector of nonnegative numbers |
tsvr |
Should be a vector of nonnegative numbers |
wts |
Should be a vector of nonnegative numbers |
errcheck_tsvreq
returns nothing but throws and error if the inputs do not
meet the requirements of a tsvreq
object
Daniel Reuman, [email protected]
vreq
class.Error check inputs for the creator function for the vreq
class.
errcheck_vreq(com, comnull, vr)
errcheck_vreq(com, comnull, vr)
com |
Should be a positive number, equal to |
comnull |
Should be a positive number |
vr |
Should be a positive number |
errcheck_vreq
returns nothing but throws and error if the inputs do not
meet the requirements of a vreq
object
Daniel Reuman, [email protected]
A data set of percent cover of plant species in a plot from Jasper Ridge Biological Preserve serpentine grassland site. See Hallett et al (2014), Ecology for details. Subplot 3 from block 3 from the control treatment was used. Plot size was 1 m^2. Values are percents. Values occasionally sum across species to more than 100 because of overlapping plant canopies.
JRGdat
JRGdat
A data frame with 28 rows and 27 columns. First column is the year of measurement, subsequent columns correspond to individual species, named in the column headers.
Hallett et al (2014) Biotic mechanisms of community stability shift along a precipitation gradient. Ecology 95, 1693-1700.
summary_tsvr
classPrint method for summary_tsvr
class
## S3 method for class 'summary_tsvr' print(x, ...)
## S3 method for class 'summary_tsvr' print(x, ...)
x |
A |
... |
Not currently used. Included for argument consistency with existing generics. |
print.summary_tsvr
is called for its effect of
printing to the screen.
Daniel Reuman, [email protected]
vreq_methods
, vreq_classic_methods
,
vreq_LdM_methods
, vreq_classic_ag_methods
,
tsvreq_methods
, tsvreq_classic_methods
,
browseVignettes("tsvr")
res<-vreq(2,1,2) summary(res)
res<-vreq(2,1,2) summary(res)
tsvr
packageSet and get methods for classes in the tsvr
package. There
are methods for each slot of each class, named set_*
and
get_*
for *
the slot name. Below are listed function
specs for the generics and the default methods.
set_ts(obj, newval) ## Default S3 method: set_ts(obj, newval) set_tsvr(obj, newval) ## Default S3 method: set_tsvr(obj, newval) set_wts(obj, newval) ## Default S3 method: set_wts(obj, newval) get_ts(obj) ## Default S3 method: get_ts(obj) get_tsvr(obj) ## Default S3 method: get_tsvr(obj) get_wts(obj) ## Default S3 method: get_wts(obj) set_com(obj, newval) ## Default S3 method: set_com(obj, newval) set_comnull(obj, newval) ## Default S3 method: set_comnull(obj, newval) set_vr(obj, newval) ## Default S3 method: set_vr(obj, newval) get_com(obj) ## Default S3 method: get_com(obj) get_comnull(obj) ## Default S3 method: get_comnull(obj) get_vr(obj) ## Default S3 method: get_vr(obj)
set_ts(obj, newval) ## Default S3 method: set_ts(obj, newval) set_tsvr(obj, newval) ## Default S3 method: set_tsvr(obj, newval) set_wts(obj, newval) ## Default S3 method: set_wts(obj, newval) get_ts(obj) ## Default S3 method: get_ts(obj) get_tsvr(obj) ## Default S3 method: get_tsvr(obj) get_wts(obj) ## Default S3 method: get_wts(obj) set_com(obj, newval) ## Default S3 method: set_com(obj, newval) set_comnull(obj, newval) ## Default S3 method: set_comnull(obj, newval) set_vr(obj, newval) ## Default S3 method: set_vr(obj, newval) get_com(obj) ## Default S3 method: get_com(obj) get_comnull(obj) ## Default S3 method: get_comnull(obj) get_vr(obj) ## Default S3 method: get_vr(obj)
obj |
An object of one of the classes defined in the package |
newval |
A newvalue of the slot in question, for the |
There are methods for S3 classes defined in the package. See documentation for the generator functions for these classes (which in all cases have the same name as the class) for lists of slots for each class.
set_*
methods throw an error - setting of individual
slots is not allowed, as it breaks consistency with the other slots.
get_*
just returns the value in question.
Daniel Reuman, [email protected]
res<-vreq(com=2,comnull=1,vr=2) get_com(res)
res<-vreq(com=2,comnull=1,vr=2) get_com(res)
tsvreq
S3 classThe tsvreq
(timescale-specific variance ratio equation) class is for storing
functional equations based on a timescale-specific variance ratio. This is a general class
from which other classes inherit (only tsvreq_classic
at this point). tsvreq
inherits from the list
class.
tsvreq(ts, com, comnull, tsvr, wts)
tsvreq(ts, com, comnull, tsvr, wts)
ts |
A vector of timescales |
com |
A numeric vector of the same length as |
comnull |
Another such |
tsvr |
Another such |
wts |
Another such |
tsvreq
returns an object of class tsvreq
. Slots are:
ts |
the input |
com |
the input, equal to |
comnull |
the input |
tsvr |
the input |
wts |
the input |
Shaopeng Wang, [email protected]; Lei Zhao, [email protected]; Daniel Reuman, [email protected]
tsvreq_methods
, tsvreq_classic
, vreq
,
browseVignettes("tsvr")
res<-tsvreq(ts=1:10,com=2*c(1:10),comnull=1:10,tsvr=rep(2,10),wts=rep(3,10))
res<-tsvreq(ts=1:10,com=2*c(1:10),comnull=1:10,tsvr=rep(2,10),wts=rep(3,10))
tsvreq_classic
S3 classThe tsvreq_classic
(timescale-specific variance ratio equation, classic variance
ratio) class is for storing functional equations based on a timescale specific version of
the classic variance ratio. Inherits from tsvreq
, which inherits from list
.
tsvreq_classic(X)
tsvreq_classic(X)
X |
a matrix with counts or densities arranged in species by time step |
tsvreq_classic
returns a tsvreq_classic
object. Slots are:
ts |
a vector of timescales |
com |
a timescale-specific decomposition of CVcom2 |
comnull |
a timescale-specific decomposition of CVcomip2 |
tsvr |
a timescale-specific version of the classic variance ratio |
wts |
a vector of weights, same length as all the above |
Daniel Reuman, [email protected]
Zhao et al, (In prep) Decomposition of the variance ratio illuminates timescale-specific population and community variability.
tsvreq_classic_methods
, tsvreq
, vreq_classic
,
browseVignettes("tsvr")
X<-matrix(runif(10*100),10,100) res<-tsvreq_classic(X)
X<-matrix(runif(10*100),10,100) res<-tsvreq_classic(X)
tsvreq_classic
classSet, get, summary, print and plot methods for the tsvreq_classic
class.
## S3 method for class 'tsvreq_classic' summary(object, ...) ## S3 method for class 'tsvreq_classic' print(x, ...) ## S3 method for class 'tsvreq_classic' plot(x, filename = NA, ...) ## S3 method for class 'tsvreq_classic' set_ts(obj, newval) ## S3 method for class 'tsvreq_classic' set_com(obj, newval) ## S3 method for class 'tsvreq_classic' set_comnull(obj, newval) ## S3 method for class 'tsvreq_classic' set_tsvr(obj, newval) ## S3 method for class 'tsvreq_classic' set_wts(obj, newval) ## S3 method for class 'tsvreq_classic' get_ts(obj) ## S3 method for class 'tsvreq_classic' get_com(obj) ## S3 method for class 'tsvreq_classic' get_comnull(obj) ## S3 method for class 'tsvreq_classic' get_tsvr(obj) ## S3 method for class 'tsvreq_classic' get_wts(obj)
## S3 method for class 'tsvreq_classic' summary(object, ...) ## S3 method for class 'tsvreq_classic' print(x, ...) ## S3 method for class 'tsvreq_classic' plot(x, filename = NA, ...) ## S3 method for class 'tsvreq_classic' set_ts(obj, newval) ## S3 method for class 'tsvreq_classic' set_com(obj, newval) ## S3 method for class 'tsvreq_classic' set_comnull(obj, newval) ## S3 method for class 'tsvreq_classic' set_tsvr(obj, newval) ## S3 method for class 'tsvreq_classic' set_wts(obj, newval) ## S3 method for class 'tsvreq_classic' get_ts(obj) ## S3 method for class 'tsvreq_classic' get_com(obj) ## S3 method for class 'tsvreq_classic' get_comnull(obj) ## S3 method for class 'tsvreq_classic' get_tsvr(obj) ## S3 method for class 'tsvreq_classic' get_wts(obj)
object , x , obj
|
An object of class |
... |
Passed to plot. Not currently used for other methods, included there only for argument consistency with existing generics. |
filename |
A filename, no extension, could have a path. Used for saving a plot as a pdf. The default value NA causes the default plotting device to be used. |
newval |
A new value, for the |
summary.tsvreq_classic
produces a summary of a tsvreq_classic
object.
Methods print.tsvreq_classic
and plot.tsvreq_classic
are also available.
For tsvreq_classic
objects,
set_*
and get_*
methods are available for all slots (see
the documentation for tsvreq_classic
for a list). The set_*
methods
just throw an error, to prevent breaking the consistency between the
slots of a tsvreq_classic
object.
Daniel Reuman, [email protected]
Zhao et al, (In prep) Decomposition of the variance ratio illuminates timescale-specific population and community variability.
X<-matrix(runif(10*100),10,100) res<-tsvreq_classic(X) get_ts(res) print(res) summary(res)
X<-matrix(runif(10*100),10,100) res<-tsvreq_classic(X) get_ts(res) print(res) summary(res)
tsvreq
classSet, get, summary, print and plot methods for the tsvreq
class.
## S3 method for class 'tsvreq' summary(object, ...) ## S3 method for class 'tsvreq' print(x, ...) ## S3 method for class 'tsvreq' plot(x, filename = NA, ...) ## S3 method for class 'tsvreq' set_ts(obj, newval) ## S3 method for class 'tsvreq' set_com(obj, newval) ## S3 method for class 'tsvreq' set_comnull(obj, newval) ## S3 method for class 'tsvreq' set_tsvr(obj, newval) ## S3 method for class 'tsvreq' set_wts(obj, newval) ## S3 method for class 'tsvreq' get_ts(obj) ## S3 method for class 'tsvreq' get_com(obj) ## S3 method for class 'tsvreq' get_comnull(obj) ## S3 method for class 'tsvreq' get_tsvr(obj) ## S3 method for class 'tsvreq' get_wts(obj)
## S3 method for class 'tsvreq' summary(object, ...) ## S3 method for class 'tsvreq' print(x, ...) ## S3 method for class 'tsvreq' plot(x, filename = NA, ...) ## S3 method for class 'tsvreq' set_ts(obj, newval) ## S3 method for class 'tsvreq' set_com(obj, newval) ## S3 method for class 'tsvreq' set_comnull(obj, newval) ## S3 method for class 'tsvreq' set_tsvr(obj, newval) ## S3 method for class 'tsvreq' set_wts(obj, newval) ## S3 method for class 'tsvreq' get_ts(obj) ## S3 method for class 'tsvreq' get_com(obj) ## S3 method for class 'tsvreq' get_comnull(obj) ## S3 method for class 'tsvreq' get_tsvr(obj) ## S3 method for class 'tsvreq' get_wts(obj)
object , x , obj
|
An object of class |
... |
Passed to plot. Not currently used for other methods, included there only for argument consistency with existing generics. |
filename |
A filename, no extension, could have a path. Used for saving a plot as a pdf. The default value NA causes the default plotting device to be used. |
newval |
A new value, for the |
summary.tsvreq
produces a summary of a tsvreq
object.
Methods print.tsvreq
and plot.tsvreq
are also available. For tsvreq
objects,
set_*
and get_*
methods are available for all slots (see
the documentation for tsvreq
for a list). The set_*
methods
just throw an error, to prevent breaking the consistency between the
slots of a tsvreq
object.
Daniel Reuman, [email protected]
res<-tsvreq(ts=1:10,com=2*c(1:10),comnull=1:10,tsvr=rep(2,10),wts=rep(3,10)) get_ts(res) print(res) summary(res) plot(res)
res<-tsvreq(ts=1:10,com=2*c(1:10),comnull=1:10,tsvr=rep(2,10),wts=rep(3,10)) get_ts(res) print(res) summary(res) plot(res)
This function is used to compute the classical or Loreau-de Mazancourt variance ratio for a community in a single plot.
vr(X, method = "classic")
vr(X, method = "classic")
X |
A matrix with counts or densities arranged in species by time steps |
method |
If |
vr
returns the value of variance ratio
Lei Zhao, [email protected]; Daniel Reuman, [email protected]
Loreau & Mazancourt, Species Synchrony and Its Drivers: Neutral and Nonneutral Community Dynamics in Fluctuating Environments. 2008, Am. Nat. 172(2)
Zhao et al, (In prep) Decomposition of the variance ratio illuminates timescale-specific population and community variability.
Peterson, Stability of species and of community for the benthos of two lagoons. 1975, Ecology, 56, 958-965.
vrf
, vreq
, vreq_classic
, vreq_LdM
,
browseVignettes("tsvr")
X<-matrix(runif(200,1,100), 10, 20) vr(X, method="LdM") vr(X, method="classic")
X<-matrix(runif(200,1,100), 10, 20) vr(X, method="LdM") vr(X, method="classic")
vreq
S3 classThe vreq
(variance ratio equation) class is for storing equations based on a
variance ratio, as in Wang S. & Loreau M. (2016) Biodiversity and ecosystem stability
across scales in metacommunities, Ecol Lett, 19, 510-518. This is a general class
from which other classes inherit (vreq_classic
, vreq_LdM
). vreq
inherits from the list
class.
vreq(com, comnull, vr)
vreq(com, comnull, vr)
com |
A single positive number |
comnull |
Another single positive number |
vr |
Another single positive number |
vreq
returns an object of class vreq
. Slots are:
com |
a single positive number equal to |
comnull |
a single positive number |
vr |
a single positive number |
Shaopeng Wang, [email protected]; Lei Zhao, [email protected]; Daniel Reuman, [email protected]
Wang S. & Loreau M. (2016) Biodiversity and ecosystem stability across scales in metacommunities. Ecol Lett, 19, 510-518.
Zhao et al, (In prep) Decomposition of the variance ratio illuminates timescale-specific population and community variability.
Peterson, Stability of species and of community for the benthos of two lagoons. 1975, Ecology, 56, 958-965.
vreq_methods
, vreq_classic
, vreq_LdM
,
vreq_classic_ag_methods
, browseVignettes("tsvr")
res<-vreq(com=2,comnull=1,vr=2)
res<-vreq(com=2,comnull=1,vr=2)
vreq_classic
S3 classThe vreq_classic
(variance ratio equation, classic variance ratio) class is for
storing equations based on the classic variance ratio. Inherits from the vreq
class,
which inherits from the list
class.
vreq_classic(X)
vreq_classic(X)
X |
A matrix with counts or densities arranged in species by years |
vreq_classic
returns a vreq_classic
object. Slots are:
com |
the squared community CV, CVcom2 |
comnull |
CVcomip2 |
vr |
the classic variance ratio |
Daniel Reuman, [email protected]
Peterson (1975) Stability of species and of community for the benthos of two lagoons. Ecology 56, 958-965.
vreq_classic_methods
, vreq
, vreq_LdM
,
vreq_classic_ag_methods
, browseVignettes("tsvr")
X<-matrix(runif(10*100),10,100) res<-vreq_classic(X)
X<-matrix(runif(10*100),10,100) res<-vreq_classic(X)
vreq_classic_ag
classSet, get, summary, and print methods for the vreq_classic_ag
class.
## S3 method for class 'vreq_classic_ag' summary(object, ...) ## S3 method for class 'vreq_classic_ag' print(x, ...) ## S3 method for class 'vreq_classic_ag' set_com(obj, newval) ## S3 method for class 'vreq_classic_ag' set_comnull(obj, newval) ## S3 method for class 'vreq_classic_ag' set_vr(obj, newval) ## S3 method for class 'vreq_classic_ag' set_ts(obj, newval) ## S3 method for class 'vreq_classic_ag' get_com(obj) ## S3 method for class 'vreq_classic_ag' get_comnull(obj) ## S3 method for class 'vreq_classic_ag' get_vr(obj) ## S3 method for class 'vreq_classic_ag' get_ts(obj)
## S3 method for class 'vreq_classic_ag' summary(object, ...) ## S3 method for class 'vreq_classic_ag' print(x, ...) ## S3 method for class 'vreq_classic_ag' set_com(obj, newval) ## S3 method for class 'vreq_classic_ag' set_comnull(obj, newval) ## S3 method for class 'vreq_classic_ag' set_vr(obj, newval) ## S3 method for class 'vreq_classic_ag' set_ts(obj, newval) ## S3 method for class 'vreq_classic_ag' get_com(obj) ## S3 method for class 'vreq_classic_ag' get_comnull(obj) ## S3 method for class 'vreq_classic_ag' get_vr(obj) ## S3 method for class 'vreq_classic_ag' get_ts(obj)
object , x , obj
|
An object of class |
... |
Not currently used. Included for argument consistency with existing generics. |
newval |
A new value, for the |
summary.vreq_classic_ag
produces a summary of a vreq_classic_ag
object.
A print.vreq_classic_ag
method is also available. For vreq_classic_ag
objects,
set_*
and get_*
methods are available for all slots (see
the documentation for aggts
for a list). The set_*
methods
just throw an error, to prevent breaking the consistency between the
slots of a vreq_classic_ag
object.
Daniel Reuman, [email protected]
Zhao et al, (In prep) Decomposition of the variance ratio illuminates timescale-specific population and community variability.
aggts
, tsvreq_classic
,
vreq_classic
, vreq_LdM
, vreq
,
browseVignettes("tsvr")
X<-matrix(runif(10*100),10,100) h<-tsvreq_classic(X) inp<-aggts(h,h$ts[h$ts>4]) print(inp) summary(inp)
X<-matrix(runif(10*100),10,100) h<-tsvreq_classic(X) inp<-aggts(h,h$ts[h$ts>4]) print(inp) summary(inp)
vreq_classic
classSet, get, summary, and print methods for the vreq_classic
class.
## S3 method for class 'vreq_classic' summary(object, ...) ## S3 method for class 'vreq_classic' print(x, ...) ## S3 method for class 'vreq_classic' set_com(obj, newval) ## S3 method for class 'vreq_classic' set_comnull(obj, newval) ## S3 method for class 'vreq_classic' set_vr(obj, newval) ## S3 method for class 'vreq_classic' get_com(obj) ## S3 method for class 'vreq_classic' get_comnull(obj) ## S3 method for class 'vreq_classic' get_vr(obj)
## S3 method for class 'vreq_classic' summary(object, ...) ## S3 method for class 'vreq_classic' print(x, ...) ## S3 method for class 'vreq_classic' set_com(obj, newval) ## S3 method for class 'vreq_classic' set_comnull(obj, newval) ## S3 method for class 'vreq_classic' set_vr(obj, newval) ## S3 method for class 'vreq_classic' get_com(obj) ## S3 method for class 'vreq_classic' get_comnull(obj) ## S3 method for class 'vreq_classic' get_vr(obj)
object , x , obj
|
An object of class |
... |
Not currently used. Included for argument consistency with existing generics. |
newval |
A new value, for the |
summary.vreq_classic
produces a summary of a vreq_classic
object.
A print.vreq_classic
method is also available. For vreq_classic
objects,
set_*
and get_*
methods are available for all slots (see
the documentation for vreq_classic
for a list). The set_*
methods
just throw an error, to prevent breaking the consistency between the
slots of a vreq_classic
object.
Daniel Reuman, [email protected]
Peterson (1975) Stability of species and of community for the benthos of two lagoons. Ecology 56, 958-965.
X<-matrix(runif(10*100),10,100) res<-vreq_classic(X) print(res) summary(res)
X<-matrix(runif(10*100),10,100) res<-vreq_classic(X) print(res) summary(res)
vreq_LdM
S3 classThe vreq_LdM
(variance ratio equation, Loreau-de Mazancourt variance ratio) class is for
storing equations based on the L-dM variance ratio. Inherits from the vreq
class,
which inherits from the list
class.
vreq_LdM(X)
vreq_LdM(X)
X |
A matrix with counts or densities arranged in species by years |
vreq_LdM
returns a vreq_LdM
object. Slots are:
com |
the squared community CV, CVcom2 |
comnull |
CVpop2 |
vr |
the L-dM variance ratio |
Daniel Reuman, [email protected]
Loreau & Mazancourt, Species Synchrony and Its Drivers: Neutral and Nonneutral Community Dynamics in Fluctuating Environments. 2008, Am. Nat. 172(2)
vreq_LdM_methods
, vreq_classic
, vreq
,
browseVignettes("tsvr")
X<-matrix(runif(10*100),10,100) res<-vreq_LdM(X)
X<-matrix(runif(10*100),10,100) res<-vreq_LdM(X)
vreq_LdM
classSet, get, summary, and print methods for the vreq_LdM
class.
## S3 method for class 'vreq_LdM' summary(object, ...) ## S3 method for class 'vreq_LdM' print(x, ...) ## S3 method for class 'vreq_LdM' set_com(obj, newval) ## S3 method for class 'vreq_LdM' set_comnull(obj, newval) ## S3 method for class 'vreq_LdM' set_vr(obj, newval) ## S3 method for class 'vreq_LdM' get_com(obj) ## S3 method for class 'vreq_LdM' get_comnull(obj) ## S3 method for class 'vreq_LdM' get_vr(obj)
## S3 method for class 'vreq_LdM' summary(object, ...) ## S3 method for class 'vreq_LdM' print(x, ...) ## S3 method for class 'vreq_LdM' set_com(obj, newval) ## S3 method for class 'vreq_LdM' set_comnull(obj, newval) ## S3 method for class 'vreq_LdM' set_vr(obj, newval) ## S3 method for class 'vreq_LdM' get_com(obj) ## S3 method for class 'vreq_LdM' get_comnull(obj) ## S3 method for class 'vreq_LdM' get_vr(obj)
object , x , obj
|
An object of class |
... |
Not currently used. Included for argument consistency with existing generics. |
newval |
A new value, for the |
summary.vreq_LdM
produces a summary of a vreq_LdM
object.
A print.vreq_LdM
method is also available. For vreq_LdM
objects,
set_*
and get_*
methods are available for all slots (see
the documentation for vreq_LdM
for a list). The set_*
methods
just throw an error, to prevent breaking the consistency between the
slots of a vreq_LdM
object.
Daniel Reuman, [email protected]
Loreau & Mazancourt, Species Synchrony and Its Drivers: Neutral and Nonneutral Community Dynamics in Fluctuating Environments. 2008, Am. Nat. 172(2)
X<-matrix(runif(10*100),10,100) res<-vreq_LdM(X) print(res) summary(res)
X<-matrix(runif(10*100),10,100) res<-vreq_LdM(X) print(res) summary(res)
vreq
classSet, get, summary, and print methods for the vreq
class.
## S3 method for class 'vreq' summary(object, ...) ## S3 method for class 'vreq' print(x, ...) ## S3 method for class 'vreq' set_com(obj, newval) ## S3 method for class 'vreq' set_comnull(obj, newval) ## S3 method for class 'vreq' set_vr(obj, newval) ## S3 method for class 'vreq' get_com(obj) ## S3 method for class 'vreq' get_comnull(obj) ## S3 method for class 'vreq' get_vr(obj)
## S3 method for class 'vreq' summary(object, ...) ## S3 method for class 'vreq' print(x, ...) ## S3 method for class 'vreq' set_com(obj, newval) ## S3 method for class 'vreq' set_comnull(obj, newval) ## S3 method for class 'vreq' set_vr(obj, newval) ## S3 method for class 'vreq' get_com(obj) ## S3 method for class 'vreq' get_comnull(obj) ## S3 method for class 'vreq' get_vr(obj)
object , x , obj
|
An object of class |
... |
Not currently used. Included for argument consistency with existing generics. |
newval |
A new value, for the |
summary.vreq
produces a summary of a vreq
object.
A print.vreq
method is also available. For vreq
objects,
set_*
and get_*
methods are available for all slots (see
the documentation for vreq
for a list). The set_*
methods
just throw an error, to prevent breaking the consistency between the
slots of a vreq
object.
Daniel Reuman, [email protected]
res<-vreq(com=2,comnull=1,vr=2) print(res)
res<-vreq(com=2,comnull=1,vr=2) print(res)
This function computes the frequency-specific variance ratio for a community in a single plot.
vrf(X)
vrf(X)
X |
a matrix with counts or densities arranged in species by time step |
vrf
returns a list consisting of
frequency |
a vector from 0 to 1 (not including 0 and 1) |
vr |
a vector of frequency-specific or frequency-decomposition of VR |
Lei Zhao, [email protected]; Daniel Reuman, [email protected]
<Lei's paper>
X<-matrix(runif(200,1,100), 10, 20) ans<-vrf(X)
X<-matrix(runif(200,1,100), 10, 20) ans<-vrf(X)
This function is used to compute weights (wts)
wts(X)
wts(X)
X |
a matrix with counts or densities arranged in species by time step |
wts
returns an object of class list consisting of
frequency |
a vector from 0 to 1 (not include 0 and 1) |
wts |
a vector of wts |
Lei Zhao, [email protected]; Daniel Reuman, [email protected]
<Lei paper>
X<-matrix(runif(200,1,100), 10, 20) ans<-wts(X)
X<-matrix(runif(200,1,100), 10, 20) ans<-wts(X)