#' Launch binder for project at mybinder.org
#'
#' @description launches binder
#'
#' @param github_username For project repo
#' @param repo_name Repository name
#' @param branch_name Branch name, eg. 'master'
#'
#' @return opens URL for binder
#' @importFrom utils browseURL
#' @export
#'
launch_binder <- function (github_username, repo_name, branch_name) {
# set up URL for mybinder.org
URL <- paste0("http://beta.mybinder.org/v2/gh/",
github_username,
"/",
repo_name,
"/",
branch_name,
"?urlpath=rstudio")
# launch binder and open URL
utils::browseURL(url = URL)
cat(URL)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.