Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_keras_available

Check if Keras is Available


Description

Probe to see whether the Keras python package is available in the current system environment.

Usage

is_keras_available(version = NULL)

Arguments

version

Minimum required version of Keras (defaults to NULL, no required version).

Value

Logical indicating whether Keras (or the specified minimum version of Keras) is available.

Examples

## Not run: 
# testthat utilty for skipping tests when Keras isn't available
skip_if_no_keras <- function(version = NULL) {
  if (!is_keras_available(version))
    skip("Required keras version not available for testing")
}

# use the function within a test
test_that("keras function works correctly", {
  skip_if_no_keras()
  # test code here
})

## End(Not run)

keras

R Interface to 'Keras'

v2.4.0
MIT + file LICENSE
Authors
Daniel Falbel [ctb, cph, cre], JJ Allaire [aut, cph], François Chollet [aut, cph], RStudio [ctb, cph, fnd], Google [ctb, cph, fnd], Yuan Tang [ctb, cph] (<https://orcid.org/0000-0001-5243-233X>), Wouter Van Der Bijl [ctb, cph], Martin Studer [ctb, cph], Sigrid Keydana [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.