ocoptions {opticut} | R Documentation |
Options for the opticut Package
Description
A convenient way of handling options related to the opticut package.
Usage
ocoptions(...)
Arguments
... |
arguments in |
Value
When parameters are set by ocoptions
, their former values are
returned in an invisible named list. Such a list can be passed as an
argument to ocoptions
to restore the parameter values.
Tags are the following:
collapse |
character value to be used when merging factor levels,
the default is |
cut |
log likelihood ratio value, model/species with lower
values are excluded from summaries and plots,
the default is |
sort |
logical value indicating if species/partitions
should be meaningfully sorted, the default is |
theme |
the color theme to be used based on |
check_comb |
check the design matrices for complementary partitions
using |
try_error |
if |
scale |
the scaling factor used to calculate indicator potential (I) based on the estimated contrast (x): I = abs(tanh(x*scale)), the default is 0.5. |
fix_fitted |
|
robust_loglik |
if ill-defined models resulting in perfect fit
(infinite log likelihood, or |
Author(s)
Peter Solymos <psolymos@gmail.com>
Examples
## simple example from Legendre 2013
## Indicator Species: Computation, in
## Encyclopedia of Biodiversity, Volume 4
## https://dx.doi.org/10.1016/B978-0-12-384719-5.00430-5
gr <- as.factor(paste0("X", rep(1:5, each=5)))
spp <- cbind(Species1=rep(c(4,6,5,3,2), each=5),
Species2=c(rep(c(8,4,6), each=5), 4,4,2, rep(0,7)),
Species3=rep(c(18,2,0,0,0), each=5))
rownames(spp) <- gr
## must add some noise to avoid perfect fit
spp[6, "Species1"] <- 7
spp[1, "Species3"] <- 17
spp
## current settings
print(unlist(ocoptions())) # these give identical answers
unlist(getOption("ocoptions"))
summary(ocall <- opticut(spp ~ 1, strata=gr, dist="gaussian", comb="all"))
## resetting pboptions and checking new settings
ocop <- ocoptions(collapse="&", sort=FALSE)
unlist(getOption("ocoptions"))
## running again with new settings
summary(ocall <- opticut(spp ~ 1, strata=gr, dist="gaussian", comb="all"))
## resetting original
ocoptions(ocop)
unlist(getOption("ocoptions"))