tests/testthat/_snaps/r-session.md

run throws

Code
  rs$run(function() stop("foobar"))
Condition
  Error:
  ! ! in callr subprocess.
  Caused by error in `(function () ...`:
  ! foobar

traceback

Code
  rs$run(do)
Condition
  Error:
  ! ! in callr subprocess.
  Caused by error in `g()`:
  ! oops

error in the load hook

Code
  local({
    rs <- r_session$new(opts)
    on.exit(rs$kill(), add = TRUE)
  })
Condition
  Error:
  ! ! callr subprocess failed: Failed to start R session


Try the callr package in your browser

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

callr documentation built on June 5, 2026, 5:06 p.m.