Description Usage Arguments Details Value See Also Examples
Generic print function applicable on object of class tw, created by function twinspan. With appropriate setting of its arguments returns detail results of TWINSPAN (including indicator species or two-way sorted table).
1 2 |
x |
Object of class |
what |
What should be printed. Default = NULL (only standard output, i.e. |
clusters |
Vector of integers. For which clusters (in case of modified TWINSPAN) the results should be returned? Default = NULL (i.e. information will be returned for all created clusters). |
... |
Arguments passed to default |
Function print.tw can access different outputs generated by TWINSPAN program, namely those stored in tw.PUN and tw.TWI files in /exec subdirectory. Printed output somewhat differ for standard and modified TWINSPAN, since modified TWINSPAN records information separately for each division, while standard TWINSPAN generate only one output files for all divisions.
Argument what can have the following values:
species.names Prints data.frame with the full species names (columns full.name) and 8-letter abbreviations generated for TWINSPAN (and used in output files) by function make.cepnames from vegan (column abbrev.name).
order.plots Prints data.frame with plots sorted by TWINSPAN algorithm (column order indicates the sequential order of the plots, column plot.no stores the original plot number).
reading.data Prints the header of TWINSPAN output, containing information about which data have be read by the algorithm
input.parameters Prints the second section of TWINSPAN output with setting of input parameters.
levels Prints the third section of TWINSPAN output with results (e.g. indicator species) for particular levels of division.
table Prints the two-way sorted table of plots and species (the fourth section of TWINSPAN output)
twi Prints all four sections of TWINSPAN output (reading.data, input.parameters, levels and table).
If what is 'species.names' or 'order.plots', output is a data.frame. If what is 'reading.data', 'input.parameters', 'levels', 'table' or 'twi', output is printed into standard connection, usually console (if not redirected by sinc). This output can be recorded using capture.output as a character vector (each element equals to one line of original console output). Such captured output could be e.g. written to file using write.table function (see Examples).
In case of modified TWINSPAN, the results for individual hierarchical divisions are separated by lines of '@@@@@...'.
1 2 3 4 5 6 7 8 9 10 | data (danube)
tw <- twinspan (danube$spe)
print (tw, 'table')
## The output of print function could be captured by "capture.output" function,
## and writen into a file using e.g. "write.table":
## Not run:
write.table (file = 'table.txt', capture.output (print (tw, 'table')), quote = F, row.names = F)
system (shell ('notepad.exe table.txt'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.