Skip to content
R for the Rest of Us Logo

This lesson is locked

Get access to all lessons in this course.


Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Your Turn

Working in exercises.Rmd:

  • Fix the code in R/themes.R to use ggplot2:: instead of library(ggplot2)

  • Run use_package(“ggplot2”) to add ggplot2 to Imports

  • Re-load the package (Cmd/Ctrl+Shift+L) and run this code to make sure it works


### in R/themes.R:

theme_avalanche <- function() { 
     ggplot2::theme_minimal(base_size = 14) + 
     ggplot2::theme(panel.grid.minor = ggplot2::element_blank())

Learn More

You can learn more about using functions from other packages in your package in the Dependencies chapter of the R Packages book.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.