This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/interactive.html
interactive {base}R Documentation

Is R running interactively ?

Usage

interactive()

Value

This function returns TRUE when R is being used interactively and FALSE when not.

See Also

source

Examples

 .First <- function() if(interactive()) x11()

[Package base version 0.60 ]