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

Description Usage Arguments Value See Also Examples

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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)
}

RSuite documentation built on June 10, 2019, 5:03 p.m.