Learn R Programming

mlstrOpalr (version 1.0.3)

opal_files_pull: Download files from an Opal environment

Description

Downloads files from an Opal environment to the local environment. This is a wrapper function for opalr::opal.file_download().

Usage

opal_files_pull(opal, from, to)

Value

Folder(s) containing files coming from Opal in user R environment.

Arguments

opal

Opal login attributes.

from

A character string of a path where the files will be taken from in R.

to

A character string of a path where the files will be placed to in Opal.

Details

Opal is the OBiBa application for data management, and Opal environments can be integrated with RStudio environments using the package opalr. The user must have adequate credentials to interact with a specific Opal environment. Some function errors produced may be associated with the handler or Opal read/write permissions.

See Also

Please see Opal documentation for complete documentation.

Examples

Run this code
if (FALSE) {

library(opalr)
opal <- 
 opal.login('administrator','password',
   url ='https://opal-demo.obiba.org/')
  
tempdir <- tempdir()
invisible(dir.create(paste0(tempdir,"/a_file")))
invisible(file.create(paste0(tempdir,"/a_file","/file.txt")))
try(opal_files_push(opal, from = paste0(tempdir,"/a_file"), to = tempdir))
try(opal_files_pull(opal, from = paste0(tempdir,"/a_file"), to = tempdir))

}

Run the code above in your browser using DataLab