
Last chance! 50% off unlimited learning
Sale ends in
This function is used to save the current or all R scripts in RStudio.
script.save(all = FALSE, check = TRUE)
logical: if TRUE
, all scripts opened in RStudio are saved.
logical: if TRUE
, argument specification is checked.
Takuya Yanagida takuya.yanagida@univie.ac.at
The function documentSave()
or documentSaveAll()
in the package
rstudioapi is used to save the R script. Note that R scripts need to
have a file location before this function can be used.
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
script.close
, script.new
, script.open
,
setsource
if (FALSE) {
# Save current R script
script.save()
# Save all R scripts
script.save(all = TRUE)
}
Run the code above in your browser using DataLab