repo_print {repo} | R Documentation |
Show a summary of the repository contents.
Description
Show a summary of the repository contents.
Usage
repo_print(tags = NULL, tagfun = "OR", find = NULL, all = F, show = "ds")
Arguments
tags |
A list of character tags. Only items matching all the tags will be shown. |
tagfun |
How to combine tags (see Details). |
find |
Character to match any filed (see Details). |
all |
Show also items tagged with "hide". |
show |
Select columns to show. |
Details
The tagfun
param specifies how to combine multiple
tags when matching items. It can be either a character or a
function. As a character, it can be one of OR
, AND
or
NOT
to specify that one, all or none of the tags must be
matched, respectively. If it is a function, it must take two tag
vectors, the first of which corresponds to tags
, and return
TRUE for a match, FALSE otherwise.
The find param can be any character string to be matched against any item field, including string-converted size (like "10x3").
Value
Used for side effects.
Examples
rp_path <- file.path(tempdir(), "example_repo")
rp <- repo_open(rp_path, TRUE)
rp$put(1, "item1", "Sample item 1", c("tag1", "tag2"))
rp$put(2, "item2", "Sample item 2", c("tag1", "hide"))
rp$put(3, "item3", "Sample item 3", c("tag2", "tag3"))
rp$print()
rp$print(all=TRUE)
rp$print(show="tds", all=TRUE)
rp$print(show="tds", all=TRUE, tags="tag1")
## wiping the temp repo
unlink(rp_path, TRUE)
## wiping temporary repo
unlink(rp_path, TRUE)