| is_dynamic_tty {cli} | R Documentation | 
Detect whether a stream supports \\r (Carriage return)
Description
In a terminal, \\r moves the cursor to the first position of the
same line. It is also supported by most R IDEs. \\r is typically
used to achieve a more dynamic, less cluttered user interface, e.g.
to create progress bars.
Usage
is_dynamic_tty(stream = "auto")
Arguments
stream | 
 The stream to inspect or manipulate, an R connection
object. It can also be a string, one of   | 
Details
If the output is directed to a file, then \\r characters are typically
unwanted. This function detects if \\r can be used for the given
stream or not.
The detection mechanism is as follows:
If the
cli.dynamicoption is set toTRUE,TRUEis returned.If the
cli.dynamicoption is set to anything else,FALSEis returned.If the
R_CLI_DYNAMICenvironment variable is not empty and set to the string"true","TRUE"or"True",TRUEis returned.If
R_CLI_DYNAMICis not empty and set to anything else,FALSEis returned.If the stream is a terminal, then
TRUEis returned.If the stream is the standard output or error within RStudio, the macOS R app, or RKWard IDE,
TRUEis returned.Otherwise
FALSEis returned.
See Also
Other terminal capabilities: 
ansi_hide_cursor(),
is_ansi_tty()
Examples
is_dynamic_tty()
is_dynamic_tty(stdout())