displaytable: A function for display the result tables.

Description Usage Arguments Value Author(s) Examples

View source: R/displaytable.R

Description

This is a function of the package "cooccurExtra". The main idea of this function is displaying the result tables in fancy format. It provides both significant cooccurence table and a table with statistic information.

Usage

1
2
3
4
displaytable(mymod, ingradients = mymod$Used.Ingradients, with.splits = FALSE,
             table.out = c("both", "stats", "significants"),
             full_stats = c("full", "prob", "obs"),
             collapse_row = c("no", "top", "bottom"))

Arguments

mymod

A list object generated by "coocana".

ingradients

A list of charaters with names of the needed ingradients where to be shown in the tables.

with.splits

Logical. "TRUE" if the tables with splits information are preferred. Cannot be "TRUE" when the input model without any split information.

table.out

Charater string, a choice of preferance output tables. (table.out = "stats") if only the table with statistics is needed. (table.out = "significants") if only the table with cooccurence association is needed. The default value is (table.out = "both"), which returns and shows both kinds of tables.

full_stats

Charater string, a choice of preferance output of statistic tables. (full_stats = "prob") if probability values are needed in statistics table. (full_stats = "obs") shows the observed number of species occurrence or co-occurrence. The default value is (full_stats = "full"), which returns all the statistic from coocana() output.

collapse_row

Character string, options of preferrance of the aligning form. (collapse_row = "top") gives the tables with species names and ingradients aligned to the top. (collapse_row = "bottom") gives the tables with species names and ingradients aligned to the bottom. The default value is (collapse_row = "no"), which returns and shows no aligned tables.

Value

Returns a list of tables in the form of data frames and tables in form of htmlwidgets.

STATSTAB

Statistic table in the form of data frame.

SIGNTAB

Significant table in the form of data frame.

STATSFT

Statistic table in the form of htmlwidget.

SIGNFT

Significant table in the form of htmlwidget.

Author(s)

Yingjia Jot He

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  # create a vector of charaters with all the needed ingradients' names
  Ing.Needed <- c("Log.mud.1.", "SST")

  # ask for the model generated by "coocana" (with splits)
  data(modelca)

  # default coocana with splits
  mytest <- displaytable(mymod = modelca)
  # set "with splits" as true
  mytest <- displaytable(mymod = modelca,
                         with.splits = TRUE,
                         table.out = "both")
  # see different row collapse options
  mytest <- displaytable(mymod = modelca,
                         with.splits = TRUE,
                         collapse_row = "top")
  mytest <- displaytable(mymod = modelca,
                         with.splits = TRUE,
                         collapse_row = "bottom")

  # case with more ingradients
  mytest <- displaytable(mymod = modelca,
                         ingradients = c(Ing.Needed , "more"),
                         with.splits = TRUE,
                         table.out = "significants")
  # case with less ingradients
  mytest <- displaytable(mymod = modelca,
                         ingradients = Ing.Needed[-1],
                         with.splits = TRUE,
                         table.out = "stats")

JotSoSerious/cooccurExtra documentation built on Oct. 30, 2019, 8:03 p.m.