| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/deprecated-0-7-0.R |
| 3 |
\name{data.frame_tidiers} |
| 4 |
\alias{data.frame_tidiers} |
| 5 |
\alias{tidy.data.frame} |
| 6 |
\alias{augment.data.frame} |
| 7 |
\alias{glance.data.frame} |
| 8 |
\title{Tidiers for data.frame objects} |
| 9 |
\source{ |
| 10 |
Skew and Kurtosis functions are adapted from implementations in the \code{moments} package: \cr |
| 11 |
Lukasz Komsta and Frederick Novomestky (2015). moments: Moments, cumulants, skewness, |
| 12 |
kurtosis and related tests. R package version 0.14. \cr |
| 13 |
https://CRAN.R-project.org/package=moments |
| 14 |
} |
| 15 |
\usage{ |
| 16 |
\method{tidy}{data.frame}(x, ..., na.rm = TRUE, trim = 0.1) |
| 17 |
|
| 18 |
\method{augment}{data.frame}(x, data, ...) |
| 19 |
|
| 20 |
\method{glance}{data.frame}(x, ...) |
| 21 |
} |
| 22 |
\arguments{ |
| 23 |
\item{x}{A data.frame} |
| 24 |
|
| 25 |
\item{...}{Additional arguments for other methods.} |
| 26 |
|
| 27 |
\item{na.rm}{a logical value indicating whether \code{NA} values should |
| 28 |
be stripped before the computation proceeds.} |
| 29 |
|
| 30 |
\item{trim}{the fraction (0 to 0.5) of observations to be trimmed from |
| 31 |
each end of \code{x} before the mean is computed. Passed to the |
| 32 |
\code{trim} argument of \code{\link{mean}}} |
| 33 |
|
| 34 |
\item{data}{data, not used} |
| 35 |
} |
| 36 |
\value{ |
| 37 |
\code{tidy.data.frame} produces a data frame with one |
| 38 |
row per original column, containing summary statistics of each: |
| 39 |
\item{column}{name of original column} |
| 40 |
\item{n}{Number of valid (non-NA) values} |
| 41 |
\item{mean}{mean} |
| 42 |
\item{sd}{standard deviation} |
| 43 |
\item{median}{median} |
| 44 |
\item{trimmed}{trimmed mean, with trim defaulting to .1} |
| 45 |
\item{mad}{median absolute deviation (from the median)} |
| 46 |
\item{min}{minimum value} |
| 47 |
\item{max}{maximum value} |
| 48 |
\item{range}{range} |
| 49 |
\item{skew}{skew} |
| 50 |
\item{kurtosis}{kurtosis} |
| 51 |
\item{se}{standard error} |
| 52 |
|
| 53 |
\code{glance} returns a one-row data.frame with |
| 54 |
\item{nrow}{number of rows} |
| 55 |
\item{ncol}{number of columns} |
| 56 |
\item{complete.obs}{number of rows that have no missing values} |
| 57 |
\item{na.fraction}{fraction of values across all rows and columns that |
| 58 |
are missing} |
| 59 |
} |
| 60 |
\description{ |
| 61 |
Data frame tidiers are deprecated and will be removed from an upcoming |
| 62 |
release of broom. |
| 63 |
} |
| 64 |
\details{ |
| 65 |
These perform tidy summaries of data.frame objects. \code{tidy} produces |
| 66 |
summary statistics about each column, while \code{glance} simply reports |
| 67 |
the number of rows and columns. Note that \code{augment.data.frame} will |
| 68 |
throw an error. |
| 69 |
} |
| 70 |
\examples{ |
| 71 |
\dontshow{if (rlang::is_installed("ggplot2")) withAutoprint(\{ # examplesIf} |
| 72 |
|
| 73 |
td <- tidy(mtcars) |
| 74 |
td |
| 75 |
|
| 76 |
glance(mtcars) |
| 77 |
|
| 78 |
library(ggplot2) |
| 79 |
# compare mean and standard deviation |
| 80 |
ggplot(td, aes(mean, sd)) + geom_point() + |
| 81 |
geom_text(aes(label = column), hjust = 1, vjust = 1) + |
| 82 |
scale_x_log10() + scale_y_log10() + geom_abline() |
| 83 |
\dontshow{\}) # examplesIf} |
| 84 |
} |
| 85 |
\seealso{ |
| 86 |
Other deprecated: |
| 87 |
\code{\link{bootstrap}()}, |
| 88 |
\code{\link{confint_tidy}()}, |
| 89 |
\code{\link{finish_glance}()}, |
| 90 |
\code{\link{fix_data_frame}()}, |
| 91 |
\code{\link{summary_tidiers}}, |
| 92 |
\code{\link{tidy.density}()}, |
| 93 |
\code{\link{tidy.dist}()}, |
| 94 |
\code{\link{tidy.ftable}()}, |
| 95 |
\code{\link{tidy.numeric}()} |
| 96 |
|
| 97 |
Other deprecated: |
| 98 |
\code{\link{bootstrap}()}, |
| 99 |
\code{\link{confint_tidy}()}, |
| 100 |
\code{\link{finish_glance}()}, |
| 101 |
\code{\link{fix_data_frame}()}, |
| 102 |
\code{\link{summary_tidiers}}, |
| 103 |
\code{\link{tidy.density}()}, |
| 104 |
\code{\link{tidy.dist}()}, |
| 105 |
\code{\link{tidy.ftable}()}, |
| 106 |
\code{\link{tidy.numeric}()} |
| 107 |
|
| 108 |
Other deprecated: |
| 109 |
\code{\link{bootstrap}()}, |
| 110 |
\code{\link{confint_tidy}()}, |
| 111 |
\code{\link{finish_glance}()}, |
| 112 |
\code{\link{fix_data_frame}()}, |
| 113 |
\code{\link{summary_tidiers}}, |
| 114 |
\code{\link{tidy.density}()}, |
| 115 |
\code{\link{tidy.dist}()}, |
| 116 |
\code{\link{tidy.ftable}()}, |
| 117 |
\code{\link{tidy.numeric}()} |
| 118 |
} |
| 119 |
\author{ |
| 120 |
David Robinson, Benjamin Nutter |
| 121 |
} |
| 122 |
\concept{deprecated} |