Skip to content

Commit

Permalink
New pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
nt246 committed Oct 2, 2024
1 parent 8f906c5 commit 2349f42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions analysis/lesson12-relational-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ To practice the `join` functions, we'll subset the `flights` dataframe as follow

```{r, eval = FALSE}
flights2 <- flights %>%
flights2 <- flights |>
select(year:day, hour, origin, dest, tailnum, carrier)
flights2
Expand Down Expand Up @@ -168,8 +168,8 @@ library(nycflights13) #install.packages("nycflights13")
```{r, eval = FALSE}
library(maps) #install.packages("maps")
airports %>%
semi_join(flights, c("faa" = "dest")) %>%
airports |>
semi_join(flights, c("faa" = "dest")) |>
ggplot(aes(lon, lat)) +
borders("state") +
geom_point() +
Expand Down
6 changes: 3 additions & 3 deletions docs/lesson12-relational-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ <h3>Row and column binding</h3>
<h3>Join functions</h3>
<p>To practice the <code>join</code> functions, we’ll subset the
<code>flights</code> dataframe as follows</p>
<pre class="r"><code>flights2 &lt;- flights %&gt;%
<pre class="r"><code>flights2 &lt;- flights |&gt;
select(year:day, hour, origin, dest, tailnum, carrier)
flights2</code></pre>
<p><br></p>
Expand Down Expand Up @@ -606,8 +606,8 @@ <h3>Optional exercises (from the R for Data Science chapter)</h3>
</ol>
<pre class="r"><code> library(maps) #install.packages(&quot;maps&quot;)

airports %&gt;%
semi_join(flights, c(&quot;faa&quot; = &quot;dest&quot;)) %&gt;%
airports |&gt;
semi_join(flights, c(&quot;faa&quot; = &quot;dest&quot;)) |&gt;
ggplot(aes(lon, lat)) +
borders(&quot;state&quot;) +
geom_point() +
Expand Down

0 comments on commit 2349f42

Please sign in to comment.