simple_sews | R Documentation |
simple_sews
objectsThis help page describes the structure of simple_sews_*
objects, such as those defined by the classes simple_sews_single
,
simple_sews_list
The spatialwarnings
uses S3 objects (lists) internally to store
indicator values, along with the necessary data to plot and display
results. It is not recommended to extract data directly from these objects,
as they are subject to change with different releases of the package. The
preferred method is to use dedicated generic functions such as
plot()
or as.data.frame()
to display or export the results.
Nonetheless, we document the structure of these objects here for reference.
simple_sews
objects are returned by all indicator functions that
return numeric values. This includes for example generic_sews
,
flowlength_sews
, compute_indicator
but *not*
patchdistr_sews
or spectral_sews
, which provide
indicators that depend on non-numeric values (e.g. patch-size distribution
type), or need to store more information than just a single numerical value
(e.g. the spectrum of the input matrix).
simple_sews
objects come in multiple variants:
simple_sews_single
is the result of an indicator function applied to
a single matrix, and simple_sews_test_single
is the result of
indictest
applied to a simple_sews_single
object. Both
these objects have list equivalents, simple_sews_list
and
simple_sews_test_list
which are simply a collection of their
'single' equivalent. These 'list' objects are used to store the results
of computations when working with multiple matrices.
A simple_sews_single
object is a list with the following components
itemvalue
the indicator values. A vector of length one if there is
only one numeric value returned by the indicator function (e.g.
flowlength_sews
, or with a length above one otherwise
orig_data
the original matrix on which the indicator was computed
fun.args
the argument used in the call to the indicator function (the function that given a matrix, returns the spatial metrics of interest)
taskname
a character string describing the current indicator(s) being computed
indicf
the indicator function, which given the matrix, returns the spatial metric(s) of interest
simple_sews_test_single
have all of the above components, plus
the following:
nulldistr
the null distribution of values, with nulln rows and as many columns as the number of values returned by the indicator function
null_mean
the mean indicator values in the null distribution
null_sd
the standard deviation of the null distribution
null_qsup
the upper quantile of the null distribution, by default the 95 adjust this
null_qinf
the upper quantile of the null distribution, by default the 05 adjust this
z_score
the z_score of the observed value relative to the null distribution, i.e. (value - null_mean) / null_sd
pval
the p-value of the indicator, i.e. the proporation of values of the null distribution that fall below the observed indicator value
null_method
the method used to produce the null matrices. See
indictest
for details
nulln
the number of null matrices used
get_nullmat
a function that can be called to obtain a randomized matrix
matrixn
the number of the matrix, can be above one if the computations have been run on a list of matrices, or non-existent if only one matrix was used
custom_indicator
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.