Learn R Programming

misty (version 0.5.0)

script.save: Save R Script in RStudio

Description

This function is used to save the current or all R scripts in RStudio.

Usage

script.save(all = FALSE, check = TRUE)

Arguments

all

logical: if TRUE, all scripts opened in RStudio are saved.

check

logical: if TRUE, argument specification is checked.

Author

Takuya Yanagida takuya.yanagida@univie.ac.at

Details

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.

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

See Also

script.close, script.new, script.open, setsource

Examples

Run this code
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