Data Science Desktop Survival Guide
by Graham Williams |
|||||
Indentation |
20200105
Preferred
window_delete <- function(action, window)
{ if (action %in% c("quit", "ask")) { ans <- TRUE msg <- "Terminate?" if (! dialog(msg)) ans <- TRUE else if (action == "quit") quit(save="no") else ans <- FALSE } return(ans) } Not Ideal |
window_delete <- function(action, window)
{ if (action %in% c("quit", "ask")) { ans <- TRUE msg <- "Terminate?" if (! dialog(msg)) ans <- TRUE else if (action == "quit") quit(save="no") else ans <- FALSE } return(ans) }
Always use spaces rather than the invisible tab character.
|