table_options {FIESTAutils}R Documentation

Table aesthetics and output options.

Description

Returns a list of user-supplied parameters and parameter values for outputting tables with custom aesthetics.

Usage

table_options(
  row.FIAname = FALSE,
  col.FIAname = FALSE,
  row.orderby = NULL,
  col.orderby = NULL,
  row.add0 = FALSE,
  col.add0 = FALSE,
  rowlut = NULL,
  collut = NULL,
  row.classify = NULL,
  col.classify = NULL,
  rawonly = FALSE,
  raw.keep0 = FALSE,
  rowgrp = FALSE,
  rowgrpnm = NULL,
  rowgrpord = NULL,
  totals = TRUE,
  allin1 = FALSE,
  metric = FALSE,
  estround = 1,
  pseround = 2,
  estnull = "--",
  psenull = "--",
  divideby = NULL,
  ...
)

Arguments

row.FIAname

Logical. If TRUE, retrieves default FIA reference names for rowvar located in ref_codes data frame. Names are only available for certain variables (Check sort(unique(ref_codes$VARIABLE)) for available names. If row.FIAname = TRUE and rowvar is in ref_codes, the rowvar name is used for the output table, and the rowvar code is used to sort.

col.FIAname

Logical. If TRUE, retrieves default FIA reference names for colvar located in ref_codes data frame. Names are only available for certain variables. Check: sort(unique(ref_codes$VARIABLE)) for available names. If col.FIAname = TRUE and rowvar is in ref_codes, the colvar name is used for the output table, and the colvar code is used to sort.

row.orderby

String. Optional. Name of variable to sort table rows. Both the rowvar and row.orderby variables must be included in the same input data.frame. if NULL, and row.FIAname=FALSE or rowvar is not in ref_codes, the rows are ordered by rowvar.

col.orderby

String. Optional. Name of variable to sort table columns. Both the colvar and col.orderby variables must be included in the same input data.frame. if NULL, and col.FIAname=FALSE or colvar is not in ref_codes, the columns are ordered by colvar.

row.add0

Logical. If TRUE, include rows with 0 values to the output table.

col.add0

Logical. If TRUE, include columns with 0 values to the output table.

rowlut

Data frame. A lookup table with variable codes and code names to include as rows of output table (See notes for more information and format).

collut

Data frame. A lookup table with variable codes and code names to include as columns of output table (See notes for more information and format).

row.classify

Data frame (if categorical) or Vector (if continuous). If clasifying categories, input a dataframe with two columns ('FROM' and 'TO'). If classifying continuous values, input a vector of class breaks for row

col.classify

Data frame (if categorical) or Vector (if continuous). If clasifying categories, input a dataframe with two columns ('FROM' and 'TO'). If classifying continuous values, input a vector of class breaks for column

rawonly

Logical. If TRUE, only rawdata are output. If dataset includes many estimation units, and only raw data tables are desired, it is more efficient to output raw data only.

raw.keep0

Logical. If TRUE, keep 0 values in raw data tables.

rowgrp

Logical. If TRUE, appends row groups to first column of table. Only available if group category exists in ref_codes table or defined in rowgrpnm (e.g., FORTYPGRPCD, OWNGRPCD).

rowgrpnm

String. Name of variable for grouping rowvar. Variable must be included in same input table as rowvar.

rowgrpord

String. Name of variable to sort row group variable. Variable must be included in same input table as rowgrpnm.

totals

Logical. If TRUE, returns total estimate (mean * AREAUSED).

allin1

Logical. If TRUE, both estimates and percent sample error are output in one table as: estimates (percent sample error).

metric

Logical. If TRUE, output if returned in metric units.

estround

Integer. Number of decimal places for estimates.

pseround

Integer. Number of decimal places for percent sampling error.

estnull

Number or character. The number or symbol to use to indicate 'not sampled' for estimate.

psenull

Number or character. The number or symbol to use to indicate 'not sampled' for percent standard error.

divideby

String. Conversion number for output ('hundred', 'thousand', 'million').

...

For extendibility.

Details

If no parameters, an empty list is returned.

Value

A list of user-supplied parameters and parameter values for outputting tables with custom aesthetics.

Author(s)

Grayson W. White

Examples


table_options(row.FIAname = TRUE, col.FIAname = TRUE)


[Package FIESTAutils version 1.2.3 Index]