tests/testthat/test-r-process.R

test_that("create and run r_process", {
  options <- r_process_options(func = function() 1 + 1)
  x <- r_process$new(options)
  x$wait()
  expect_equal(x$get_result(), 2)
  rm(x)
  gc()
})

Try the callr package in your browser

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

callr documentation built on June 22, 2024, 6:48 p.m.