This function is used to close the current R script in RStudio. Note that by
default the function closes the script without saving unless the argument
save is set to TRUE.
Usage
script.close(save = FALSE, check = TRUE)
Arguments
save
logical: if TRUE, the script is saved before closing.
check
logical: if TRUE, argument specification is checked.
The function documentClose() in the package rstudioapi is used
to close the R script.
References
Ushey, K., Allaire, J., Wickham, H., & Ritchie, G. (2022). rstudioapi: Safely
access the RStudio API. R package version 0.14.
https://CRAN.R-project.org/package=rstudioapi