diff --git a/analysis/lesson12-relational-data.Rmd b/analysis/lesson12-relational-data.Rmd index 709bfc3..9c8c595 100644 --- a/analysis/lesson12-relational-data.Rmd +++ b/analysis/lesson12-relational-data.Rmd @@ -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 @@ -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() + diff --git a/docs/lesson12-relational-data.html b/docs/lesson12-relational-data.html index e0ea7d5..4f3895f 100644 --- a/docs/lesson12-relational-data.html +++ b/docs/lesson12-relational-data.html @@ -575,7 +575,7 @@

Row and column binding

Join functions

To practice the join functions, we’ll subset the flights dataframe as follows

-
flights2 <- flights %>% 
+
flights2 <- flights |> 
   select(year:day, hour, origin, dest, tailnum, carrier)
 flights2


@@ -606,8 +606,8 @@

Optional exercises (from the R for Data Science chapter)

    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() +