Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
adamblake committed May 28, 2024
2 parents 2e959c0 + 0ea9910 commit 6db1ef8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 27 deletions.
30 changes: 20 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ output: github_document
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
fig.path = "man/figures/README-"
)
options(coursekata.quiet = TRUE)
```
Expand All @@ -34,14 +33,8 @@ This package makes it easy to install and load all packages and functions used i

## Installation

This package is *not* available on CRAN, it is only available on GitHub. You can install it using any package manager that supports GitHub installations, such as [`remotes`](https://cran.r-project.org/package=remotes) or [`pak`](https://cran.r-project.org/package=pak).

```{r eval = FALSE}
# install.packages("remotes")
remotes::install_github("coursekata/coursekata-r")
# install.packages("pak")
pak::pak("coursekata/coursekata-r")
install.packages("coursekata")
```

After installing the core packages, you might want to install the supplementary data packages used in the course. These are not required for the package to work, but they are used in the course materials. You can install them with the following command:
Expand All @@ -50,18 +43,35 @@ After installing the core packages, you might want to install the supplementary
coursekata::coursekata_install()
```

If you don't install these packages, you will be prompted to install them when you load the package. If you want to disable that message, you can set `options(coursekata.quickstart = TRUE)`.
If you don't install these packages, you will be prompted to install them each time you load the package. If you want to disable that prompt, you can set `options(coursekata.quickstart = TRUE)`.

### Development version

To get a bug fix or to use a feature from the development version, you can install the development version of `coursekata` from GitHub.

```{r eval = FALSE}
# install.packages("pak")
pak::pak("coursekata/coursekata-r")
```


## Loading Packages Used in CourseKata Courses

`library(coursekata)` will load the following core packages in addition to the [functions and theme](#functions-and-theme) included in the `coursekata` package:

```{r echo = FALSE}
prev_width <- getOption("width")
options(width = 72)
```

```{r}
library(coursekata)
```

```{r echo = FALSE}
options(width = prev_width)
```

* [supernova](https://cran.r-project.org/package=supernova), for
- creating ANOVA tables.
- tools for extracting information from fitted models (`b0()`, `b1()`, `PRE()`, `fVal()`)
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,8 @@ the [tidyverse](https://tidyverse.tidyverse.org) meta-package.

## Installation

This package is *not* available on CRAN, it is only available on GitHub.
You can install it using any package manager that supports GitHub
installations, such as
[`remotes`](https://cran.r-project.org/package=remotes) or
[`pak`](https://cran.r-project.org/package=pak).

``` r
# install.packages("remotes")
remotes::install_github("coursekata/coursekata-r")

# install.packages("pak")
pak::pak("coursekata/coursekata-r")
install.packages("coursekata")
```

After installing the core packages, you might want to install the
Expand All @@ -57,8 +47,18 @@ coursekata::coursekata_install()
```

If you don’t install these packages, you will be prompted to install
them when you load the package. If you want to disable that message, you
can set `options(coursekata.quickstart = TRUE)`.
them each time you load the package. If you want to disable that prompt,
you can set `options(coursekata.quickstart = TRUE)`.

### Development version

To get a bug fix or to use a feature from the development version, you
can install the development version of `coursekata` from GitHub.

``` r
# install.packages("pak")
pak::pak("coursekata/coursekata-r")
```

## Loading Packages Used in CourseKata Courses

Expand All @@ -68,7 +68,7 @@ to the [functions and theme](#functions-and-theme) included in the

``` r
library(coursekata)
#> ── CourseKata packages ──────────────────────────────────── coursekata 0.16.1 ──
#> ── CourseKata packages ──────────────────────────── coursekata 0.17.0 ──
#> ✔ dslabs 0.8.0 ✔ Metrics 0.1.4
#> ✔ Lock5withR 1.2.2 ✔ lsr 0.5.2
#> ✔ fivethirtyeightdata 0.1.0 ✔ mosaic 1.9.1
Expand Down Expand Up @@ -181,7 +181,7 @@ samp_dist_of_b1 <- do(1000) * b1(lm(mpg ~ hp, data = resample(mtcars)))
gf_histogram(~ samp_dist_of_b1$b1)
```

<img src="man/figures/README-samp_dist_of_b1-1.png" width="100%" />
![](man/figures/README-samp_dist_of_b1-1.png)<!-- -->

Other estimates and terms can be bootstrapped using the same technique,
but you will need to calculate the values yourself. Here’s an example of
Expand All @@ -200,7 +200,7 @@ samp_dist_of_hp <- do(1000) * {
gf_histogram(~ samp_dist_of_hp$result)
```

<img src="man/figures/README-samp_dist_of_hp-1.png" width="100%" />
![](man/figures/README-samp_dist_of_hp-1.png)<!-- -->

### Sectioning a Distribution

Expand All @@ -216,7 +216,7 @@ shade in those areas:
gf_histogram(~Thumb, data = Fingers, fill = ~ middle(Thumb, .80))
```

<img src="man/figures/README-shaded_middle-1.png" width="100%" />
![](man/figures/README-shaded_middle-1.png)<!-- -->

### Toggling the Theme

Expand Down
Binary file modified man/figures/README-samp_dist_of_b1-1.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 man/figures/README-samp_dist_of_hp-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6db1ef8

Please sign in to comment.