lazyLs: List contents of lazy load database, using a tag

Description Usage Arguments Value Author(s) See Also Examples

Description

This will simply list object names that are contained within an archivist lazy load database. The listing can be done with a tag.

Usage

1
2
lazyLs(tag = NULL, lazyDir = NULL, tagType = "objectName:",
  archivistCol = "tag", exact = FALSE)

Arguments

tag

Character string (not vectorized!). Search objects using this tag as a pattern.

lazyDir

Character string of directory to be used for the lazy databases. This creates an archivist repository.

tagType

Some tags have prefixes, such as "class:". The search can be thus within a tagType if this is specified. If "all", then all tag types are returned.

archivistCol

The name of the column to return from a showLocalRepo call. This can be "tag" or "artifact" or "createdDate".

exact

Logical. Should the tag matching be exact matching or not.

If exact=TRUE is used, this is equivalent to a regexp expression with ^expr$.

Value

A character vector that matches the tagType, tag, and archivistCol requested.

Author(s)

Eliot McIntire

See Also

lazyLs, lazyRm, lazyLoad2, lazyIs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
tmpdir <- lazyDir(file.path(tempdir(), "lazyDir"), create=TRUE)
a <- rnorm(10)
b <- rnorm(20)
lazySave(a, b, lazyDir = tmpdir)
lazyLs(lazyDir=tmpdir)

# can set lazyDir and don't need lazyDir argument
lazyDir(tmpdir)
lazyLs()

# can add a tag to file list
lazyLs(tag = "function") # empty character vector
lazyLs(tag = "numeric") # object names of a and b

# To return the values of different tags, use the tagType argument
lazyLs(tagType="objectName:") # Just object names, the default
lazyLs(tagType="class:")      # All classes in the database,
                              #returns multiple lines per object
lazyLs(tagType="all")         # returns all information in the database
unlink(tmpdir, recursive = TRUE)

## End(Not run)

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