Create or edit R or test files
This pair of functions makes it easy to create paired R and test files,
using the convention that the tests for R/foofy.R
should live
in tests/testthat/test-foofy.R
. You can use them to create new files
from scratch by supplying name
, or if you use RStudio, you can call
to create (or navigate to) the paired file based on the currently open
script.
use_r(name = NULL, open = rlang::is_interactive()) use_test(name = NULL, open = rlang::is_interactive())
name |
Either a name without extension, or |
open |
Whether to open the file for interactive editing. |
The testing and R code chapters of R Packages.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.