R/url.open.R

Defines functions url.open

Documented in url.open

#' @title Launch a web browser to go to a URL, like browseURL does
#'
#' @description Just the same as \code{\link{browseURL}}
#' @param myurl required character element, URL to open
#' @return Just launches browser to open URL
#' @seealso \code{\link{browseURL}}, and \code{\link{shell.exec}} which this uses
#' @export
url.open <- function(myurl) {

  # also just see browseURL()

  if (analyze.stuff::get.os()=='win') {
    shell.exec(myurl)
  } else {
    system( paste('open ', myurl, sep='') )
  }
}
ejanalysis/ejanalysis documentation built on Dec. 31, 2019, 11:50 p.m.