calculateStatistics {strvalidator} | R Documentation |
Summary Statistics
Description
Calculate summary statistics for the selected target and scope.
Usage
calculateStatistics(
data,
target,
quant = 0.95,
group = NULL,
count = NULL,
decimals = -1,
debug = FALSE
)
Arguments
data |
data.frame containing the data of interest. |
target |
character column to calculate summary statistics for. |
quant |
numeric quantile to calculate 0,1, default 0.95. |
group |
character vector of column(s) to group by, if any. |
count |
character column to count unique values in, if any. |
decimals |
numeric number of decimals. Negative does not round. |
debug |
logical indicating printing debug information. |
Details
Calculate summary statistics for the given target column ('X') across the
entire dataset or grouped by one or multiple columns, and counts the number
of unique values in the given count column ('Y'). Returns a data.frame
with the grouped columns, number of unique values 'Y.n', number of
observations 'X.n', the minimum value 'X.Min', the mean value 'X.Mean',
standard deviation 'X.Stdv', and the provided percentile 'X.Perc.##'.
For more details see unique
, min
, mean
, sd
,
quantile
.
Value
data.frame with summary statistics.