1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 01:22:25 +02:00

param header for freq

This commit is contained in:
2018-10-19 21:52:08 +02:00
parent 86b03577a7
commit ec15b82fd6
3 changed files with 50 additions and 42 deletions

View File

@ -9,11 +9,12 @@
\usage{
frequency_tbl(x, ..., sort.count = TRUE,
nmax = getOption("max.print.freq"), na.rm = TRUE, row.names = TRUE,
markdown = FALSE, digits = 2, quote = FALSE, sep = " ")
markdown = FALSE, digits = 2, quote = FALSE, header = !markdown,
sep = " ")
freq(x, ..., sort.count = TRUE, nmax = getOption("max.print.freq"),
na.rm = TRUE, row.names = TRUE, markdown = FALSE, digits = 2,
quote = FALSE, sep = " ")
quote = FALSE, header = !markdown, sep = " ")
top_freq(f, n)
@ -29,16 +30,18 @@ top_freq(f, n)
\item{nmax}{number of row to print. The default, \code{15}, uses \code{\link{getOption}("max.print.freq")}. Use \code{nmax = 0}, \code{nmax = Inf}, \code{nmax = NULL} or \code{nmax = NA} to print all rows.}
\item{na.rm}{a logical value indicating whether \code{NA} values should be removed from the frequency table. The header will always print the amount of \code{NA}s.}
\item{na.rm}{a logical value indicating whether \code{NA} values should be removed from the frequency table. The header_txt will always print the amount of \code{NA}s.}
\item{row.names}{a logical value indicating whether row indices should be printed as \code{1:nrow(x)}}
\item{markdown}{print table in markdown format (this forces \code{nmax = NA})}
\item{digits}{how many significant digits are to be used for numeric values in the header (not for the items themselves, that depends on \code{\link{getOption}("digits")})}
\item{digits}{how many significant digits are to be used for numeric values in the header_txt (not for the items themselves, that depends on \code{\link{getOption}("digits")})}
\item{quote}{a logical value indicating whether or not strings should be printed with surrounding quotes}
\item{header}{a logical value indicating whether an informative header should be printed}
\item{sep}{a character string to separate the terms when selecting multiple columns}
\item{f}{a frequency table}
@ -54,7 +57,7 @@ Create a frequency table of a vector with items or a data frame. Supports quasiq
\details{
Frequency tables (or frequency distributions) are summaries of the distribution of values in a sample. With the `freq` function, you can create univariate frequency tables. Multiple variables will be pasted into one variable, so it forces a univariate distribution. This package also has a vignette available to explain the use of this function further, run \code{browseVignettes("AMR")} to read it.
For numeric values of any class, these additional values will all be calculated with \code{na.rm = TRUE} and shown into the header:
For numeric values of any class, these additional values will all be calculated with \code{na.rm = TRUE} and shown into the header_txt:
\itemize{
\item{Mean, using \code{\link[base]{mean}}}
\item{Standard Deviation, using \code{\link[stats]{sd}}}
@ -66,7 +69,7 @@ For numeric values of any class, these additional values will all be calculated
\item{Outliers (total count and unique count), using \code{\link[grDevices]{boxplot.stats}}}
}
For dates and times of any class, these additional values will be calculated with \code{na.rm = TRUE} and shown into the header:
For dates and times of any class, these additional values will be calculated with \code{na.rm = TRUE} and shown into the header_txt:
\itemize{
\item{Oldest, using \code{\link{min}}}
\item{Newest, using \code{\link{max}}, with difference between newest and oldest}