lazyDir: Set and get the lazyR database directory

Description Usage Arguments Value Author(s) See Also Examples

Description

This can be set and gotten with these functions, or all functions can take an argument, lazyDir, manually. lazyDir() is a shorthand for lazyDir(). lazyDir("someDir") is a shorthand for lazyDir("someDir")

Usage

1
2
3
4
5
6
7
8
9

Arguments

lazyDir

Character string of directory to be used for the lazy databases. If lazyDir=NULL, then it removes the active lazy directory. If NA, the default, returns the currently set lazyDir.

create

Logical, passed to checkLazyDir, i.e., it will create dir if it doesn't exist. Default is FALSE.

Value

New lazyDir created (for lazyDir) or currently active lazyDir returned.

Author(s)

Eliot McIntire

See Also

lazyLs, lazyLoad2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
lazyDir() # Returns NULL if not set

# Set new lazyDir
lazyDir(file.path(tempdir(), "lazyDir"), create=TRUE)

# Check new value
lazyDir()

a <- rnorm(10)
lazySave(a) # add to lazyDir
lazyRm("a") # remove object from lazyDir

lazyDir(NULL) # removes currently set lazyDir
lazyDir()  # confirm removal
unlink(file.path(tempdir(), "lazyDir"), recursive=TRUE) # remove folder and lazyDir

PredictiveEcology/lazyR documentation built on May 8, 2019, 3:10 p.m.