WARNING: these functions are deprecated as the saving/reading functions are already simple enough in the newer versions of the alabaster framework. Read and write objects from a local staging directory. These are just convenience wrappers around functions like loadObject, stageObject and writeMetadata.

quickLoadObject(dir, path, ...)

quickStageObject(x, dir, path, ...)

Arguments

dir

String containing a path to the directory.

path

String containing a relative path to the object of interest inside dir.

...

Further arguments to pass to loadObject (for quickLoadObject) or stageObject (for quickStageObject).

x

Object to be saved.

Value

For quickLoadObject, the object at path.

For quickStageObject, the object is saved to path inside dir. All necessary directories are created if they are not already present. A NULL is returned invisibly.

Author

Aaron Lun

Examples

local <- tempfile()

# Creating a slightly complicated object:
library(S4Vectors)
df <- DataFrame(A=1:10, B=LETTERS[1:10])
df$C <- DataFrame(D=letters[1:10], E=runif(10))

# Saving it:
quickStageObject(df, local, "FOOBAR")

# Reading it back:
quickLoadObject(local, "FOOBAR")
#> DataFrame with 10 rows and 3 columns
#>            A           B            C
#>    <integer> <character>  <DataFrame>
#> 1          1           A a:0.08075014
#> 2          2           B b:0.83433304
#> 3          3           C c:0.60076089
#> 4          4           D d:0.15720844
#> 5          5           E e:0.00739944
#> 6          6           F f:0.46639350
#> 7          7           G g:0.49777739
#> 8          8           H h:0.28976724
#> 9          9           I i:0.73288199
#> 10        10           J j:0.77252151