Skip to content

Commit

Permalink
Added stats:: to median, sd, and quantile in mcmc_tidiers.
Browse files Browse the repository at this point in the history
Updated NEWS and cran-comments.md, incremented DESCRIPTION to 0.4.0.

This is the version originally submitted to CRAN as broom 0.4.0.
  • Loading branch information
Dave Robinson committed Nov 30, 2015
1 parent 1909b3d commit f67a8b9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: broom
Type: Package
Title: Convert Statistical Analysis Objects into Tidy Data Frames
Version: 0.3.7.9000
Date: 2015-05-05
Version: 0.4.0
Date: 2015-11-30
Authors@R: c(
person("David", "Robinson", email = "admiral.david@gmail.com", role = c("aut", "cre")),
person("Matthieu", "Gomez", email = "mattg@princeton.edu", role = "ctb"),
Expand Down
9 changes: 6 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
* Added a `tidy` method for x,y,z lists used by `image` and `persp`

broom 0.3.7.9000
broom 0.4.0
-----------

* Added tidiers for geeglm, nlrq, roc, boot, bgterm, kappa, binWidth, binDesign, rcorr, stanfit, rjags, gamlss, and mle2 objects.
* Added `tidy` methods for lists, including u, d, v lists from `svd`, and x, y, z lists used by `image` and `persp`
* Added `quick` argument to `tidy.lm`, `tidy.nls`, and `tidy.biglm`, to create a smaller and faster version of the output.
* Changed `rowwise_df_tidiers` to allow the original data to be saved as a list column, then provided as a column name to `augment`. This required removing `data` from the `augment` S3 signature. Also added `tests-rowwise.R`
* Fixed various issues in ANOVA output
* Fixed various issues in lme4 output
* Fixed issues in tests caused by dev version of ggplot2

broom 0.3.7
-----------
Expand Down
8 changes: 3 additions & 5 deletions R/mcmc_tidiers.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## FIXME: design question -- how to make tidying methods inherit appropriately?

#' Tidying methods for MCMC (Stan, JAGS, etc.) fits
#'
#' @param x an object of class \sQuote{"stanfit"}
Expand Down Expand Up @@ -79,16 +77,16 @@ tidyMCMC <- function(x,
estimate.method <- match.arg(estimate.method, c("mean", "median"))
m <- switch(estimate.method,
mean = colMeans(ss),
median = apply(ss, 2, median))
median = apply(ss, 2, stats::median))

ret <- data.frame(estimate = m,
std.error = apply(ss, 2, sd))
std.error = apply(ss, 2, stats::sd))
if (conf.int) {
levs <- c((1 - conf.level) / 2, (1 + conf.level) / 2)

conf.method <- match.arg(conf.method, c("quantile", "HPDinterval"))
ci <- switch(conf.method,
quantile = t(apply(ss, 2, quantile, levs)),
quantile = t(apply(ss, 2, stats::quantile, levs)),
coda::HPDinterval(coda::as.mcmc(ss), prob = conf.level))

colnames(ci) <- c("conf.low", "conf.high")
Expand Down
18 changes: 11 additions & 7 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
broom 0.3.7
broom 0.4.0
-----------

## Changes

This is a re-submission:

* Put 'dplyr', 'tidyr' and 'ggplot2' in single quotes in DESCRIPTION
* Added tidiers for geeglm, nlrq, roc, boot, bgterm, kappa, binWidth, binDesign, rcorr, stanfit, rjags, gamlss, and mle2 objects.
* Added `tidy` methods for lists, including u, d, v lists from `svd`, and x, y, z lists used by `image` and `persp`
* Added `quick` argument to `tidy.lm`, `tidy.nls`, and `tidy.biglm`, to create a smaller and faster version of the output.
* Changed `rowwise_df_tidiers` to allow the original data to be saved as a list column, then provided as a column name to `augment`. This required removing `data` from the `augment` S3 signature. Also added `tests-rowwise.R`
* Fixed various issues in ANOVA output
* Fixed various issues in lme4 output
* Fixed issues in tests caused by dev version of ggplot2

## Test environments
* local OS X install, R 3.2.0
* local OS X install, R 3.2.2
* win-builder (devel and release)

## R CMD check results
There were no ERRORs or WARNINGs.
There were no ERRORs, WARNINGs or NOTEs.

## Reverse dependencies
Broom has one reverse dependency, radiant. I ran R CMD check on radiant 0.1.83 with broom 0.3.7 and it showed no ERRORs, WARNINGs, or NOTEs.
Broom has seven reverse dependencies in CRAN: AutoModel, dotwhisker, eyetrackingR, forestmodel, HydeNet, pixiedust, and plotly. I ran R CMD CHECK on each with the newest version of broom and found no ERRORs, WARNINGs, or NOTEs.

0 comments on commit f67a8b9

Please sign in to comment.