Convenience function to test in a very hacky way whether the library function was called correctly in its most simple form. There is support for the different ways to call the library function

check_library(state, package, not_called_msg = NULL,
  incorrect_msg = NULL)

Arguments

state

state to start from

package

package name for which the library() function should've been called

not_called_msg

optional feedback message in case the library function wasn't called a single time

incorrect_msg

optional feedback message in case the library function wasn't called for the specified package.

Examples

if (FALSE) { # example solution library(ggvis) # sct to test whether ggvis was loaded ex() %>% check_library("ggvis") }