Summary method for distance sampling data frames.
Rdistance data frames are rowwise tibbles. This routine is a
replacement summary method for rowwise_df's that
provides useful distance sampling descriptive statistics.
# S3 method for rowwise_df
summary(object, formula = NULL, w.lo = 0, w.hi = NULL, ...)If object is an RdistDf, a data frame
containing summary statistics relevant to distance sampling is returned
invisibly.
If formula is not specified, the number of distance observations
and target detections is not returned because the distances, group sizes,
and covariates are not known.
If object is not an Rdistance data frame, return is the result of
the next summary method.
An RdistDf data frame.
A standard formula object. For example, dist ~ 1,
dist ~ covar1 + covar2). The left-hand side (before ~)
is the name of the vector containing off-transect or radial detection distances.
The right-hand side contains the names of covariate
vectors to fit in the detection
function, and potentially group sizes. Group sizes are specified
by including + groupsize(<variable>) in the RHS
(see 'Group Sizes' section).
Covariates can be either detection level
or transect level and can appear in data or exist in the
global working environment. Regular R scoping
rules apply.
Lower or left-truncation limit of the distances in distance data.
This is the minimum possible off-transect distance. Default is 0. If
w.lo is greater than 0, it must have measurement units.
See help(unitHelpers) for assistance assigning units.
Upper or right-truncation limit of the distances
in dist. This is the maximum off-transect distance that
could be observed. If unspecified (i.e., NULL),
right-truncation is set to the maximum of the observed
distances. If w.hi is specified, it must have
measurement units.
See help(unitHelpers) for assistance assigning units.
Other arguments for summary methods.
data(thrasherDf)
summary(thrasherDf)
summary(thrasherDf
, formula = dist ~ groupsize(groupsize)
, w.hi = setUnits(100,"m")
)
Run the code above in your browser using DataLab