Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hyperlink

Terminal Hyperlinks


Description

Terminal Hyperlinks

Usage

hyperlink(text, url)

has_hyperlink()

Arguments

text

Text to show. text and url are recycled to match their length, via a paste0() call.

url

URL to link to.

Details

hyperlink()' creates an ANSI hyperlink.

has_hyperlink() checks if the current stdout() supports hyperlinks. terminal links.

Value

Logical scalar, for has_hyperlink().

Examples

cat("This is an", hyperlink("R", "https://r-project.org"), "link.\n")
has_hyperlink()

crayon

Colored Terminal Output

v1.4.1
MIT + file LICENSE
Authors
Gábor Csárdi [aut, cre], Brodie Gaslam [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.