Description Usage Arguments Value Author(s) Examples
This is the main function of the package "cooccurExtra". The main idea of this function is to do a further analysis into the cooccurence between species base on function "cooccur". It helps reproduce the analysis of cooccurences between different species pairs in different ingradients. It can be used in diagnostic pairs, creating splits plots, creating matrix for the use of "cooccur" function and displaying fancy output tables.
1 2 3 4 5 | coocana(mydata, ID.Col = "es", species = NA, ingradients = NA,
type = c("byrow", "bycol", "all"), with.splits = FALSE,
show.tables = FALSE, pair.scatter = c("scatter", "fit", "none"),
any.output = c("lite", "full", "none"), plot_title = TRUE,
show.split.plot = c("none", "both", "splits", "dendrogram"))
|
mydata |
A data frame, which contains species and ingradients information from different regions. |
ID.Col |
Charater string, gives the name of a column in the data frame for the use of identifier. With a default value "es". |
species |
A list of charaters with names of the needed species. |
ingradients |
A list of charaters with names of the needed ingradients where to be shown in the tables. |
plot_title |
A logical value, which indicates showing plots with or without title. |
type |
Charaters string, choices of species pairing types. (type = "byrow") by default. Pairing all possible pairs of species if (type = "all"). |
with.splits |
Logical. "TRUE" if the tables with splits information are preferred. Cannot be "TRUE" when the input model without any split information. |
show.tables |
Logical. Display fancy tables if "TRUE". |
pair.scatter |
Charaters string, choices of displaying scatter plots types. By default, display only the scatter plots. (pair.scatter = "fit") if the scatter plot with fitted curve is preferred. (pair.scatter = "none") if no scatter plot is needed. |
any.output |
Charaters string, choices of output model types. By default, output the "lite" results. (any.output = "full") if the full result is preferred. (any.output = "none") if no result is needed. |
show.split.plot |
Charaters string,choices of the showing plots. (show.plots = "splits") shows only the break points in the scatter plots. (show.plots = "dendrgram") shows only the tree dendrograms from the "rpart" models. (show.plots = "none") if no plot is needed. The default is (show.plots = "both"), which shows both the splits plots and the dendrograms. |
Returns a list of objects inculding models, splits and tables and etc.
Model |
A list of "cooccur" models in different splited ranges for different species pairs. Or one "cooccur" model if (with.splits = FALSE). |
Splits |
A list of break points in different ingradients and for different species. Or "NA" if (with.splits = FALSE). |
Stats |
Statistic table containing all analyzed species pairs and probabilities for rejecting classifying positive and negative associations. |
Pairs |
The used pairs of species. |
Cooc.Mat |
A matrix in the form for the usage of "cooccur" function. |
Used.Ingradients |
The used ingradients. |
Yingjia Jot He
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # create a vector of charaters with all the needed species' names
Four.Needed <- c("alpheus", "theora.lubrica",
"austrovenus.stutchburyi", "macomona.liliana")
# create a vector of charaters with all the needed ingradients' names
Ing.Needed <- c("Log.mud.1.", "SST")
# ask for the data frame to be analized
data(macrofauna)
# show the scatter plot with fitted curve
mytest = coocana(mydata = macrofauna, species = Four.Needed,
pair.scatter = "fit")
# show the split plots and the dendrograms
mytest = coocana(mydata = macrofauna, species = Four.Needed,
ingradients = Ing.Needed, with.splits = TRUE,
pair.scatter = "none", show.split.plot = "both")
# show fancy tables
mytest = coocana(mydata = macrofauna, species = Four.Needed,
ingradients = Ing.Needed, with.splits = TRUE,
pair.scatter = "none", show.tables = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.