Skip to content

Commit

Permalink
Backport update
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Oct 31, 2023
1 parent 10fc4ba commit 54e7ab3
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 39 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3

Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ License: GPL-3
URL: https://modelr.tidyverse.org, https://github.com/tidyverse/modelr
BugReports: https://github.com/tidyverse/modelr/issues
Depends:
R (>= 3.2)
R (>= 3.6)
Imports:
broom,
magrittr,
Expand All @@ -27,8 +27,8 @@ Suggests:
ggplot2,
testthat (>= 3.0.0)
Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Config/testthat/edition: 3
44 changes: 12 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
<!-- badges: start -->

[![Lifecycle:
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![R build
status](https://github.com/tidyverse/modelr/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/modelr/actions)
superseded](https://img.shields.io/badge/lifecycle-superseded-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html#superseded)
[![R-CMD-check](https://github.com/tidyverse/modelr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidyverse/modelr/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/tidyverse/modelr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/modelr?branch=main)
<!-- badges: end -->

## Overview

The modelr package provides functions that help you create elegant
pipelines when modelling. It is designed primarily to support teaching
the basics of modelling within the tidyverse, particularly in [R for
Data Science](https://r4ds.had.co.nz/model-basics.html).
pipelines when modelling. It was designed primarily to support teaching
the basics of modelling for the 1st edition of [R for Data
Science](https://r4ds.had.co.nz/model-basics.html).

Please see <https://www.tidymodels.org/> for a more comprehensive
framework for modelling within the tidyverse.
We no longer recommend it and instead suggest
<https://www.tidymodels.org/> for a more comprehensive framework for
modelling within the tidyverse.

## Installation

Expand All @@ -29,22 +29,8 @@ install.packages("tidyverse")

# Alternatively, install just modelr:
install.packages("modelr")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidyverse/modelr")
```

## Status

modelr is stable: it has achieved its goal of making it easier to teach
modelling within the tidyverse. For more general modelling tasks, check
out the family of “tidymodel” packages like
[recipes](https://topepo.github.io/recipes/),
[rsample](https://topepo.github.io/rsample/),
[parsnip](https://topepo.github.io/parsnip/), and
[tidyposterior](https://topepo.github.io/tidyposterior/).

## Getting started

``` r
Expand Down Expand Up @@ -158,7 +144,7 @@ df %>% add_predictions(mod)
#> 8 0.0586 5.98 3.36
#> 9 0.0637 2.96 3.39
#> 10 0.0652 3.54 3.40
#> # … with 90 more rows
#> # 90 more rows
df %>% add_residuals(mod)
#> # A tibble: 100 × 3
#> x y resid
Expand All @@ -173,7 +159,7 @@ df %>% add_residuals(mod)
#> 8 0.0586 5.98 2.62
#> 9 0.0637 2.96 -0.428
#> 10 0.0652 3.54 0.146
#> # … with 90 more rows
#> # 90 more rows
```

For visualization purposes it is often useful to use an evenly spaced
Expand All @@ -194,7 +180,7 @@ data_grid(mtcars, wt = seq_range(wt, 10), cyl, vs)
#> 8 1.95 4 1
#> 9 1.95 6 0
#> 10 1.95 6 1
#> # … with 50 more rows
#> # 50 more rows

# For continuous variables, seq_range is useful
mtcars_mod <- lm(mpg ~ wt + cyl + vs, data = mtcars)
Expand All @@ -212,11 +198,5 @@ data_grid(mtcars, wt = seq_range(wt, 10), cyl, vs) %>% add_predictions(mtcars_mo
#> 8 1.95 4 1 27.5
#> 9 1.95 6 0 24.2
#> 10 1.95 6 1 24.8
#> # … with 50 more rows
#> # 50 more rows
```

## Code of conduct

Please note that this project is released with a [Contributor Code of
Conduct](https://modelr.tidyverse.org/CODE_OF_CONDUCT.html). By
participating in this project you agree to abide by its terms.
5 changes: 0 additions & 5 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ template:
development:
mode: auto

home:
links:
- text: Learn more
href: http://r4ds.had.co.nz/model-basics.html

reference:

- title: Resampling
Expand Down
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon.ico
Binary file not shown.

0 comments on commit 54e7ab3

Please sign in to comment.