dwww Home | Show directory contents | Find package

library(testit)

assert("Rscript() correctly calls Rscript with system2()", {
  (Rscript(c("-e", "1+1"), stdout = TRUE) %==% "[1] 2")
})

assert("Rscript_call() correctly calls Rscript()", {
  (Rscript_call(function() 1+1) %==% 2)
  loaded = Rscript_call(
    function() loadedNamespaces(), options = "--default-packages=xfun"
  )
  ("xfun" %in% loaded)
})

Generated by dwww version 1.15 on Mon Jun 24 15:16:20 CEST 2024.