ReportTable | R Documentation |
ReportTable will summarize historic estimates from in an .html table that can be exported for reporting.
ReportTable(
data,
species,
year,
index = "none",
yr.avg,
cap = "none",
new.names = "none",
missing = NULL
)
data |
The estimates object. Must be in a format with Year, Species, index, and index variance if not one of the included package data objects (ACPHistoric, CRDHistoric, YKDHistoric, YKDVHistoric, or YKGHistoric). |
species |
The species chosen (see |
year |
The range of years for the table. |
index |
The column names that specify the index estimate and its variance. Must be ordered correctly (index, variance) or (index1, variance1, index2, variance2). Currently up to 2 indices are supported. If no index is specified, the user will be prompted with choices from the data. |
yr.avg |
The number of years in the n-year running average requested. |
cap |
The overall table caption. If nothing entered as an argument, the user will be prompted to enter a caption in the function. |
new.names |
The desired column names for the final table. If these are not specified the user will be prompted to input within the function. |
missing |
Any missing years of data to be displayed as NA |
ReportTable will take one of the historic estimates tables (package data for AKaerial) and display it as an .html table object suitable for an external report. The user can specify n for an n-year average if one is desired. A similarly structured data frame could be used in place of one of the historic estimates tables, provided it has columns for Year, Species, an index, and that index variance. Table caption and column headings can either be specified as arguments or entered by the user once the table is created
Renders an .html table and also returns it in data frame format
Charles Frost, charles_frost@fws.gov
https://github.com/USFWS/AKaerial
ReportTable(data=ACPHistoric$combined, species="SPEI", year = c(2007:2019), index = c("total", "total.var"), yr.avg=3, cap="Test table!", new.names=c("Year", "Total Birds", "SE", "3-year Avg", "SE"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.