Movatterモバイル変換


[0]ホーム

URL:


interactive {base}R Documentation

Is R Running Interactively?

Description

ReturnTRUE whenR is being used interactively andFALSE otherwise.

Usage

interactive()

Details

An interactiveR session is one in which it is assumed that there isa human operator to interact with, so for exampleR can prompt forcorrections to incorrect input or ask what to do next or if it is OKto move to the next plot.

GUI consoles will arrange to startR in an interactive session. WhenR is run in a terminal (viaRterm.exe on Windows), itassumes that it is interactive if ‘stdin’ is connected to a(pseudo-)terminal and not if ‘stdin’ is redirected to a file orpipe. Command-line options--interactive (Unix) and--ess (Windows,Rterm.exe) override the defaultassumption.(On a Unix-alike, whether thereadline command-line editor isused isnot overridden by--interactive.)

Embedded uses ofR can set a session to be interactive or not.

Internally, whether a session is interactive determines

In addition,R's ownR code makes use ofinteractive(): forexamplehelp,debugger andinstall.packages do.

Note

This is aprimitive function.

See Also

source,.First

Examples

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

[Packagebase version 4.6.0Index]

[8]ページ先頭

©2009-2025 Movatter.jp