Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
cran ready
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Aug 18, 2019
1 parent af4e32a commit 1d15612
Show file tree
Hide file tree
Showing 38 changed files with 253 additions and 366 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,7 +1,7 @@
Type: Package
Package: broomExtra
Title: Enhancements for 'broom' Package Family
Version: 0.0.4.9000
Version: 0.0.5
Authors@R:
person(given = "Indrajeet",
family = "Patil",
Expand Down
4 changes: 0 additions & 4 deletions R/generics.R
Expand Up @@ -33,10 +33,6 @@
#' lm.mod <- lm(Reaction ~ Days, sleepstudy)
#' broomExtra::tidy(x = lm.mod, conf.int = TRUE)
#'
#' # in case you enter a dataframe, tidier will return data as a tibble
#' # note that rownames are preserved but other attributes might be lost
#' broomExtra::tidy(mtcars)
#'
#' # unsupported object (the function will return `NULL` in such cases)
#' broomExtra::tidy(list(1, c("x", "y")))
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/reexports.R
Expand Up @@ -22,4 +22,4 @@ rlang::`%||%`

#' @export
#' @importFrom rlang "%|%"
rlang::`%|%`
rlang::`%|%`
13 changes: 8 additions & 5 deletions README.Rmd
Expand Up @@ -8,6 +8,8 @@ output: github_document
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
message = FALSE,
warning = FALSE,
fig.path = "man/figures/README-",
out.width = "100%"
)
Expand Down Expand Up @@ -357,15 +359,16 @@ library(ggplot2)
# plotting those estimates
dplyr::group_by(.data = df_augment, id) %>%
dplyr::summarise(.data = ., mean.resid = mean(.resid)) %>%
dplyr::ungroup(x = .) %>%
dplyr::ungroup(x = .) %>%
tibble::rowid_to_column(.data = .) %>% # creating a plot
ggplot(data = ., aes(rowid, mean.resid)) +
geom_point(size = 3, alpha = 0.5, color = "blue") +
geom_point(size = 3, alpha = 0.5, color = "blue") +
geom_line(color = "black") +
geom_hline(aes(yintercept = 0),
color = "red",
size = 1,
linetype = "dashed") +
color = "red",
size = 1,
linetype = "dashed"
) +
ggstatsplot::theme_ggstatsplot() +
labs(
title = "mean difference between fitted and observed values from bootstrap samples",
Expand Down
29 changes: 7 additions & 22 deletions README.md
Expand Up @@ -28,7 +28,7 @@ Status](https://coveralls.io/repos/github/IndrajeetPatil/broomExtra/badge.svg?br
[![Project Status: Active - The project has reached a stable, usable
state and is being actively
developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Last-changedate](https://img.shields.io/badge/last%20change-2019--08--14-yellowgreen.svg)](https://github.com/IndrajeetPatil/broomExtra/commits/master)
[![Last-changedate](https://img.shields.io/badge/last%20change-2019--08--18-yellowgreen.svg)](https://github.com/IndrajeetPatil/broomExtra/commits/master)
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-red.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![minimal R
version](https://img.shields.io/badge/R%3E%3D-3.5.0-6666ff.svg)](https://cran.r-project.org/)
Expand Down Expand Up @@ -101,20 +101,11 @@ models.
``` r
set.seed(123)
library(lme4)
#> Loading required package: Matrix
library(ordinal)
#>
#> Attaching package: 'ordinal'
#> The following objects are masked from 'package:lme4':
#>
#> ranef, VarCorr

# mixed-effects models (`broom.mixed` will be used)
lmm.mod <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
broomExtra::tidy(x = lmm.mod, effects = "fixed")
#> Registered S3 method overwritten by 'broom.mixed':
#> method from
#> tidy.gamlss broom
#> # A tibble: 2 x 5
#> effect term estimate std.error statistic
#> <chr> <chr> <dbl> <dbl> <dbl>
Expand Down Expand Up @@ -416,7 +407,6 @@ broomExtra::grouped_augment(
formula = price ~ carat + (carat | color) - 1,
control = lme4::lmerControl(optimizer = "bobyqa")
)
#> boundary (singular) fit: see ?isSingular
#> # A tibble: 26,970 x 15
#> cut price carat color .fitted .resid .hat .cooksd .fixed .mu
#> <ord> <int> <dbl> <ord> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
Expand Down Expand Up @@ -493,12 +483,6 @@ dplyr::filter(df_boot, term != "(Intercept)") %>%
x = "bootstrap sample",
y = "regression estimate"
)
#> Registered S3 methods overwritten by 'car':
#> method from
#> influence.merMod lme4
#> cooks.distance.influence.merMod lme4
#> dfbeta.influence.merMod lme4
#> dfbetas.influence.merMod lme4
```

<img src="man/figures/README-boot_tidy-1.png" width="100%" />
Expand Down Expand Up @@ -590,15 +574,16 @@ library(ggplot2)
# plotting those estimates
dplyr::group_by(.data = df_augment, id) %>%
dplyr::summarise(.data = ., mean.resid = mean(.resid)) %>%
dplyr::ungroup(x = .) %>%
dplyr::ungroup(x = .) %>%
tibble::rowid_to_column(.data = .) %>% # creating a plot
ggplot(data = ., aes(rowid, mean.resid)) +
geom_point(size = 3, alpha = 0.5, color = "blue") +
geom_point(size = 3, alpha = 0.5, color = "blue") +
geom_line(color = "black") +
geom_hline(aes(yintercept = 0),
color = "red",
size = 1,
linetype = "dashed") +
color = "red",
size = 1,
linetype = "dashed"
) +
ggstatsplot::theme_ggstatsplot() +
labs(
title = "mean difference between fitted and observed values from bootstrap samples",
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Expand Up @@ -14,7 +14,7 @@
],
"issueTracker": "https://github.com/IndrajeetPatil/broomExtra/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.0.4.9000",
"version": "0.0.5",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Expand Up @@ -10,4 +10,4 @@
## Comments

- Makes this package compatible with the upcoming release of `tidyr` package.
- No problems revealed for any of the dependencies.
- No problems revealed for any of the strong dependencies.
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ISSUE_TEMPLATE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/SUPPORT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 20 additions & 14 deletions docs/articles/available_methods.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 comments on commit 1d15612

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/testthat/test-generics.R:34:7: style: Commented code should be removed.

# testthat::expect_equal(dim(broomExtra::tidy(mtcars)), c(32L, 12L))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-generics.R:35:7: style: Commented code should be removed.

# testthat::expect_identical(names(broomExtra::tidy(mtcars))[1], "rownames")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/testthat/test-generics.R:34:7: style: Commented code should be removed.

# testthat::expect_equal(dim(broomExtra::tidy(mtcars)), c(32L, 12L))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-generics.R:35:7: style: Commented code should be removed.

# testthat::expect_identical(names(broomExtra::tidy(mtcars))[1], "rownames")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/testthat/test-generics.R:34:7: style: Commented code should be removed.

# testthat::expect_equal(dim(broomExtra::tidy(mtcars)), c(32L, 12L))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-generics.R:35:7: style: Commented code should be removed.

# testthat::expect_identical(names(broomExtra::tidy(mtcars))[1], "rownames")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/testthat/test-generics.R:34:7: style: Commented code should be removed.

# testthat::expect_equal(dim(broomExtra::tidy(mtcars)), c(32L, 12L))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-generics.R:35:7: style: Commented code should be removed.

# testthat::expect_identical(names(broomExtra::tidy(mtcars))[1], "rownames")
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please sign in to comment.