DiskInterface: Class of objects for interacting with objects downloaded to...

Description Usage Arguments Format Examples

Description

A DiskInterface objects holds methods for reading and writing objects from disk in a particular format. We assume that your "disk" is your local disk, as we use base R functions such as file.exists to interact with objects.

Usage

1

Arguments

read_fn

function. Used to read objects from disk to R.

write_fn

function. Used to write objects from R to disk.

Format

An object of class R6ClassGenerator of length 24.

Examples

1
2
3
4
5
6
7
8
## Not run: 
  RDS <- DiskInterface$new(read_fn, write_fn)
  # read an RDS file into R
  df <- RDS$read("~/files/df.RDS")
  # write an object to an RDS file
  RDS$write(df2, "~/files/df2.RDS")

## End(Not run)

abelcastilloavant/csmpi documentation built on May 24, 2019, 7:21 p.m.