Skip to contents

Get a remote, based on the configuration in orderly_config.yml - different remote drivers have different methods, and this function gives you access to these lower-level objects.


orderly_remote(remote = NULL, root = NULL, locate = TRUE)



Description of the location. Typically this is a character string indicating a remote specified in the remotes block of your orderly_config.yml. It is also possible to pass in a directly created remote object (e.g., using orderly_remote_path(), or one provided by another package). If left NULL, then the default remote for this orderly repository is used - by default that is the first listed remote.


The path to an orderly root directory, or NULL (the default) to search for one from the current working directory if locate is TRUE.


Logical, indicating if the configuration should be searched for. If TRUE and config is not given, then orderly looks in the working directory and up through its parents until it finds an orderly_config.yml file.


The orderly remote, as described in orderly_config.yml - if no remotes are configured, or if the requested remote does not exist, an error will be thrown.

See also

orderly_pull_dependencies() which provides a higher-level interface to pulling from a remote (including adding the downloaded archive into your orderly repository), and see the documentation underlying the orderly remote driver that your orderly_config.yml declares for information about using that remote.


## We need two orderly repositories here - one as a "local" and one as
## a "remote" (see ?orderly_pull_archive)
path_remote <- orderly::orderly_example("demo")
path_local <- orderly::orderly_example("demo")

## Configure our remote:
path_config <- file.path(path_local, "orderly_config.yml")
txt <- readLines(path_config)
  "  default:",
  "    driver: orderly::orderly_remote_path",
  "    args:",
  paste("      path:", path_remote)),

## Get our remote:
remote <- orderly::orderly_remote(root = path_local)

## Can use the remote's methods to interact directly - actual methods
## depend on the remote driver being used.
#>  [1] "changelog"          "connection"         "default-param"     
#>  [4] "global"             "html"               "interactive"       
#>  [7] "minimal"            "multi-artefact"     "multifile-artefact"
#> [10] "other"              "slow1"              "slow10"            
#> [13] "slow3"              "spaces"             "use_dependency"    
#> [16] "use_dependency_2"   "use_resource"       "use_resource_dir"  
#> [19] "view"