library(tidyquintro) library(learnr) library(gradethis) knitr::opts_chunk$set(echo = FALSE, exercise.warn_invisible = FALSE) # enable code checking tutorial_options(exercise.checker = grade_learnr)
Alter the code so that instead of being a standard R command, that the data is piped into the command instead.
filter(penguins, species == "Gentoo")
penguins |> filter(species == "Gentoo")
grade_code( correct = random_praise(), incorrect = random_encouragement() )
enter the dataset first then pipe ` |> ` into the filter function, excluding the data set name inside the filter
Alter the code below so that rather than being two distinct function calls, they are piped into each other.
Alter the code so that instead of being a standard R command, that the data is piped into the command instead.
penguins |> filter(species == "Gentoo") penguins |> select(species, contains("bill"))
penguins |> filter(species == "Gentoo") |> select(species, contains("bill"))
grade_code( correct = random_praise(), incorrect = random_encouragement() )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.