Learn R Programming

GeneSelectR (version 1.0.1)

skip_if_no_modules: Check if Python Modules are Available

Description

This helper function checks if a list of Python modules are available. If any are not, it skips the tests.

Usage

skip_if_no_modules(module_names)

Value

Nothing is returned explicitly, but if a specified module is not available, the function invokes testthat::skip to skip the tests that require that module.

Arguments

module_names

A vector of names of the Python modules to check.

Examples

Run this code
# \donttest{
# Example usage within a test file:
module_names <- c("numpy", "pandas", "sklearn")
skip_if_no_modules(module_names)
# }

Run the code above in your browser using DataLab