tests/testthat/test-packageManagement.R

test_that("packageManagement can identify installed packages", {
  expect_true(package.installed("base"))
})
test_that("packageManagement can identify non-installed packages", {
  expect_false(package.installed("boa constrictor", askInstall = FALSE))
})

Try the sonicscrewdriver package in your browser

Any scripts or data that you put into this service are public.

sonicscrewdriver documentation built on May 29, 2024, 3:39 a.m.