Session Ready
Exercise

Undefined global variables

The way in which you define variables in tidyverse package functions can cause confusion for the R CMD check, which sees column names and the name of your dataset, and flags them as "undefined global variables".

To get around this, you can manually specify the data and its columns as a vector to utils::globalVariables(), by including a line of code similar to the following in your package-level documentation:

utils::globalVariables(c("dataset_name", "col_name_1", "col_name_2"))

This defines dataset_name, col_name_1, and col_name_2 as global variables, and now you shouldn't get the undefined global variables error.

Instructions
100 XP

A new function, get_mean_temp(), is available in your workspace. Take a look at what it does by running get_mean_temp (with no brackets) in the console. Update the package-level documentation so this function can be successfully added to your package without causing check() to fail because of "undefined global variables".