defaultApp: defaultApp

View source: R/gh.R

defaultAppR Documentation

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, ...)

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

Value

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

See Also

berryFunctions::openFile()

Examples

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

sigbertklinke/mmstat4 documentation built on Sept. 13, 2024, 4:46 p.m.