Skip to contents

This function applies a specified function to write an object to a file in a temporary location and then uploads the file to an Integral repository.

Usage

integral_write(
  x,
  FUN,
  ...,
  path,
  reason = NULL,
  url = getOption("integral_url")
)

Arguments

x

An object in the R environment to be written to a file.

FUN

A function to be used to write x to a file. This could be any function that takes an object as its first argument and a file path as its second argument, such as write.csv, write_xpt, etc.

...

Additional arguments to be passed to the FUN function.

path

Character string specifying the target file path within the Integral repository. This should include the desired file name and extension.

reason

Optional character string describing the reason for the file upload.

url

A character string representing the base URL of the Integral repository. Defaults to getOption("integral_url").

Examples

if (FALSE) { # \dontrun{

integral_write(
  x = mtcars,
  FUN = write.csv,
  path = "Root Folder/Data/mtcars.csv",
  reason = "add more data"
  )
} # }