summary {spsurvey} | R Documentation |
Summarize sampling frames, design sites, and analysis data.
Description
summary()
summarizes sampling frames, design sites, and analysis data. The right-hand of the
formula specifies the variables (or factors) to
summarize by. If the left-hand side of the formula is empty, the
summary will be of the distributions of the right-hand side variables. If the left-hand side
of the formula contains a variable, the summary will be of the left-hand size variable
for each level of each right-hand side variable. Equivalent to sp_summary()
; both
are currently maintained for backwards compatibility.
Usage
## S3 method for class 'sp_frame'
summary(object, formula = ~1, onlyshow = NULL, ...)
## S3 method for class 'sp_design'
summary(object, formula = ~siteuse, siteuse = NULL, onlyshow = NULL, ...)
Arguments
object |
An object to summarize. When summarizing sampling frames,
an |
formula |
A formula. One-sided formulas are used to summarize the
distribution of numeric or categorical variables. For one-sided formulas,
variable names are placed to the right of |
onlyshow |
A string indicating the single level of the single right-hand side variable for which a summary is requested. This argument is only used when a single right-hand side variable is provided. |
... |
Additional arguments to pass to |
siteuse |
A character vector indicating the design sites
for which summaries are requested in |
Value
If the left-hand side of the formula is empty, a named list containing summaries of the count distribution for each right-hand side variable is returned. If the left-hand side of the formula contains a variable, a named list containing five number summaries (numeric left-hand side) or tables (categorical or factor left hand side) is returned for each right-hand side variable.
Author(s)
Michael Dumelle Dumelle.Michael@epa.gov
Examples
## Not run:
data("NE_Lakes")
summary(NE_Lakes, ELEV ~ 1)
summary(NE_Lakes, ~ ELEV_CAT * AREA_CAT)
sample <- grts(NE_Lakes, 100)
summary(sample, ~ ELEV_CAT * AREA_CAT)
## End(Not run)