Skip to content

Instantly share code, notes, and snippets.

@remlapmot
Last active July 22, 2024 09:18
Show Gist options
  • Save remlapmot/9275ddff2c8675db49800cee2e1876e8 to your computer and use it in GitHub Desktop.
Save remlapmot/9275ddff2c8675db49800cee2e1876e8 to your computer and use it in GitHub Desktop.
Run devtools::check() as CRAN
# Run check as CRAN (well sort of)
devtools::check(env_vars = c(NOT_CRAN = FALSE))
devtools::check(env_vars = c(NOT_CRAN = FALSE), cran = TRUE, force_suggests = TRUE, incoming = TRUE)
# Additionally not building/re-running the vignettes
devtools::check(
env_vars = c(NOT_CRAN = FALSE),
args = c(
'--no-manual',
'--no-vignettes',
'--no-build-vignettes'
),
build_args = c(
'--no-build-vignettes',
'--no-manual'
)
)
# Additionally not building/re-running the vignettes and not running tests
devtools::check(
env_vars = c(NOT_CRAN = FALSE),
args = c(
'--no-manual',
'--no-vignettes',
'--no-build-vignettes',
'--no-tests'
),
build_args = c(
'--no-build-vignettes',
'--no-manual'
)
)
# Additionally do not run examples in helpfiles
devtools::check(
env_vars = c(NOT_CRAN = FALSE),
args = c(
'--no-manual',
'--no-vignettes',
'--no-build-vignettes',
'--no-tests',
'--no-examples'
),
build_args = c(
'--no-build-vignettes',
'--no-manual'
)
)
# Building vignettes but not the tests
devtools::check(
env_vars = c(NOT_CRAN = FALSE),
args = c(
'--no-manual',
'--no-tests'
),
build_args = c(
'--no-manual'
)
)
@remlapmot
Copy link
Author

RStudio support article here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment