Learn R Programming

RSuite (version 0.37-253)

repo_adapter_get_path: Returns the adapter path related to the project to use for dependencies resolution.

Description

Returns the adapter path related to the project to use for dependencies resolution.

Usage

repo_adapter_get_path(repo_adapter, params, ix = NA)

Arguments

repo_adapter

repo adapter object

params

rsuite_project_params object

ix

repo adapter index in project repositories or NA to retrieve all paths for the adapter. (type: integer, default: NA)

Value

path to the repository for the project.

See Also

Other in extending RSuite with Repo adapter: repo_adapter_create_base, repo_adapter_create_manager, repo_adapter_get_info, repo_manager_destroy, repo_manager_get_info, repo_manager_init, repo_manager_remove, repo_manager_upload

Examples

Run this code
# NOT RUN {
# create you own Repo adapter
repo_adapter_create_own <- function() {
  result <- repo_adapter_create_base("Own")
  class(result) <- c("repo_adapter_own", class(result))
  return(result)
}

#' @export
repo_adapter_get_path.repo_adapter_own <- function(repo_adapter, params, ix = NA) {
  # get arguments of the repo adapter specified in project PARAMETERS
  arg <- params$get_repo_adapter_arg(repo_adapter$name, default = "", ix = ix)
  url <- "https://..." # make url to repository base on arg
  return(url)
}

# }

Run the code above in your browser using DataLab