opal_files_push: Upload files to an Opal environment

View source: R/09-opal_functions.R

opal_files_pushR Documentation

Upload files to an Opal environment

Description

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

Usage

opal_files_push(opal, from, to)

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.

Value

Folder(s) containing files coming from the user R environment in Opal. The path to Opal needs to be pasted with Opal absolute path.

See Also

Please see Opal documentation for complete documentation.

Examples

## Not run: 

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))


## End(Not run)


mlstrOpalr documentation built on Oct. 11, 2023, 5:15 p.m.