Skip to content
Open System Files, URLs, Anything
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Remove app_args argument, merge them into app Sep 10, 2018
inst Initial commit of Mason template Sep 10, 2018
man Remove app_args argument, merge them into app Sep 10, 2018
tests Remove app_args argument, merge them into app Sep 10, 2018
.Rbuildignore Add appveyor config Sep 10, 2018
.travis.yml REmove test coverage Sep 10, 2018
DESCRIPTION Use the cleanup reporter from ps Sep 10, 2018
LICENSE
NAMESPACE Make xopen() S3 generic Sep 10, 2018
NEWS.md Initial commit of Mason template Sep 10, 2018
README.md Remove app_args argument, merge them into app Sep 10, 2018
appveyor.yml

README.md

xopen

Open System Files, URLs, Anything

Linux Build Status Windows Build status CRAN RStudio mirror downloads

Cross platform solution to open files, directories or URLs with their associated programs. Inspired by shell.exec(), https://github.com/pwnall/node-open and https://github.com/sindresorhus/opn

Installation

Once released, you can install xopen from CRAN:

install.packages("xopen")

Usage

library(xopen)

Open a file:

xopen("test.R")

Open a URL:

xopen("https://ps.r-lib.org")

URL with given app:

chrome <- function() {
  switch(
    get_os(),
    win = "Chrome",
    macos = "google chrome",
    other = "google-chrome")
}
xopen("https://processx.r-lib.org", app = chrome())

Open a given app (or switch to it, if already open):

xopen(app = chrome())

App and arguments. (You need to quit Chrome for this to work):

xopen(app = c(chrome(), "--incognito", "https://github.com"))

License

MIT © RStudio

You can’t perform that action at this time.