Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via {sandpaper}
Source  : 6e0f0bf
Branch  : main
Author  : Naupaka Zimmerman <naupaka@gmail.com>
Time    : 2023-12-13 16:32:55 +0000
Message : Merge pull request #243 from sstevens2/patch-5

Removing tidyverse install from ggplot lesson
  • Loading branch information
actions-user committed Dec 13, 2023
1 parent c4ad68e commit e9727b7
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 1,639 deletions.
2 changes: 1 addition & 1 deletion 03-basics-factors-dataframes.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ These packages will be installed into "~/work/genomics-r-intro/genomics-r-intro/
# Installing packages --------------------------------------------------------
- Installing ggplot2 ... OK [linked from cache]
Successfully installed 1 package in 5.9 milliseconds.
Successfully installed 1 package in 6.1 milliseconds.
```

::::::::::::::::::::::::::::::::::::::::::::::::::
Expand Down
45 changes: 30 additions & 15 deletions 06-data-visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ source: Rmd

<img src="https://ggplot2.tidyverse.org/logo.png" align="right" alt="Line plot enclosed in hexagon shape with ggplot2 typed beneath and www.rstudio.com at the bottom.">

**`ggplot2`** is a plotting package that makes it simple to create complex plots from data in a data frame. It provides a more programmatic interface for specifying what variables to plot, how they are displayed, and general visual properties. Therefore, we only need minimal changes if the underlying data change or if we decide to change from a bar plot to a scatter plot. This helps in creating publication-quality plots with minimal amounts of adjustments and tweaking.
**`ggplot2`** is a plotting package, part of the tidyverse,
that makes it simple to create complex plots from data in a data frame. It provides a more programmatic interface for specifying what variables to plot, how they are displayed, and general visual properties. Therefore, we only need minimal changes if the underlying data change or if we decide to change from a bar plot to a scatter plot. This helps in creating publication-quality plots with minimal amounts of adjustments and tweaking.

The **gg** in "**ggplot**" stands for "**G**rammar of **G**raphics," which is an elegant yet powerful way to describe the making of scientific plots. In short, the grammar of graphics breaks down every plot into a few components, namely, a dataset, a set of geoms (visual marks that represent the data points), and a coordinate system. You can imagine this is a grammar that gives unique names to each component appearing in a plot and conveys specific information about data. With **ggplot**, graphics are built step by step by adding new elements.

Expand All @@ -47,33 +48,47 @@ The idea of **mapping** is crucial in **ggplot**. One familiar example is to *ma

## Installing `tidyverse`

**`ggplot2`** belongs to the [**`tidyverse`** framework](https://www.tidyverse.org/). Therefore, we will start with loading the package **`tidyverse`**. If **`tidyverse`** is not already installed, then we need to install first. If it is already installed, then we can skip the following step:
First, we need to install the `ggplot2` package.


```r
install.packages("tidyverse") # Installing tidyverse package, includes ggplot2 and other packages such as dplyr, readr, tidyr
install.packages("ggplot2")
```

Now, let's load the `tidyverse` package:
Now, let's load the `ggplot2` package:


```r
library(tidyverse)
library(ggplot2)
```

We will also use some of the other tidyverse packages we used in the last episode, so we need to load them as well.


```r
library(readr)
library(dplyr)
```

```{.output}
Attaching package: 'dplyr'
```

```{.output}
The following objects are masked from 'package:stats':
filter, lag
```

```{.output}
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.4
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.4.4 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.0
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
```



As we can see from above output **`ggplot2`** has been already loaded along with other packages as part of the **`tidyverse`** framework.

## Loading the dataset
Expand Down
88 changes: 0 additions & 88 deletions config.yaml

This file was deleted.

Binary file modified depth.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"episodes/03-basics-factors-dataframes.Rmd" "4660e67699c358bbf4aa70e5ff7b4e24" "site/built/03-basics-factors-dataframes.md" "2023-12-13"
"episodes/04-bioconductor-vcfr.Rmd" "10eb69b4697d7ecb9695d36c0d974208" "site/built/04-bioconductor-vcfr.md" "2023-12-13"
"episodes/05-dplyr.Rmd" "f74055bd8677338a213e0a0c6c430119" "site/built/05-dplyr.md" "2023-12-13"
"episodes/06-data-visualization.Rmd" "d17499bf239ee3eb1a3cfbb956269d32" "site/built/06-data-visualization.md" "2023-12-13"
"episodes/06-data-visualization.Rmd" "f15dac1534761a7c3108ff7373a0aab9" "site/built/06-data-visualization.md" "2023-12-13"
"episodes/07-r-help.Rmd" "1a7610b0efbaebfdd03ff4540125a790" "site/built/07-r-help.md" "2023-12-13"
"instructors/instructor-notes.md" "78f6fe6109a0eb19a16ec6663941da7f" "site/built/instructor-notes.md" "2023-12-13"
"learners/discuss.md" "522bcb192adf6702a2e3cb2f0d1412b5" "site/built/discuss.md" "2023-12-13"
"learners/reference.md" "4e0dcbc7892af6f9610d44d356e66617" "site/built/reference.md" "2023-12-13"
"learners/setup.md" "a789e69f286e17497a70650fd6be7041" "site/built/setup.md" "2023-12-13"
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2023-12-13"
"renv/profiles/lesson-requirements/renv.lock" "e4ad182cf33dbfa3783fb3cbbd0f9e24" "site/built/renv.lock" "2023-12-13"
"renv/profiles/lesson-requirements/renv.lock" "59c9fcecaf565fc8fb8d9d8ea3e41196" "site/built/renv.lock" "2023-12-13"
Loading

0 comments on commit e9727b7

Please sign in to comment.