Learn R Programming

mmstat4 (version 0.2.0)

defaultApp: defaultApp

Description

Tries to open the given file with the default application of the operating system using base::system2(). Only Windows (windows), macOS (darwin), Linux (linux) and FreeBSD (freebsd) is supported.

Usage

defaultApp(file, wait = FALSE, ...)

Value

Result of try(system2, ...), invisibly

Arguments

file

character: file name

wait

logical: indicates whether the R interpreter should wait for the command to finish, or run it asynchronously (default: FALSE)

...

further arguments passed to system2

See Also

Examples

Run this code
if (interactive()) {
  ghget()
  defaultApp(ghlist("dataanalysis.pdf", full.names = TRUE))
}

Run the code above in your browser using DataLab