Fungsi quit atau aliasnya q mengakhiri sesi R saat ini.
quit(save = "default", status = 0, runLast = TRUE)
q(save = "default", status = 0, runLast = TRUE)
| Parameter | Deskripsi |
|---|---|
save |
a character string indicating whether the environment (workspace) should be saved, one of "no", "yes", "ask" or "default". |
status |
the (numerical) error status to be returned to the operating system, where relevant. Conventionally 0 indicates successful completion. |
runLast |
should .Last() be executed? |
# NOT RUN {
## Unix-flavour example
.Last <- function() {
graphics.off() # close devices before printing
cat("Now sending PDF graphics to the printer:\n")
system("lpr Rplots.pdf")
cat("bye bye...\n")
}
quit("yes")
# }