View source: R/s_crandb_tvdb.R
s_crandb_tvdb | R Documentation |
This is a function for task view maintenance.
Search packages in a subset of crandb
within dates from
and to
that contain one or several keywords in the columns "Package", "Title", "Description",
'Author" or "Maintainer", then verify if these packages are already refereed in one
of the task views stored in tvdb
.
s_crandb_tvdb(..., char = NULL, tv = "Distributions", from = -10,
to = Sys.Date(), select = "PTD", mode = "or", sensitive = FALSE,
perl = FALSE, fixed = FALSE, agrep = FALSE, max.distance = 0.1,
costs = NULL, crandb = get("crandb", envir = .GlobalEnv),
tvdb = get("tvdb", envir = .GlobalEnv))
... |
any format recognized by |
char |
(name to) a character vector. Use this argument if |
tv |
character. One task view among those listed in tvdb. |
from |
character representing a date earlier than date |
to |
date. The upper date in the search. |
select |
character vector. A sub-vector of |
mode |
character among "or", "and", "relax". The search mode.
"relax" is for 3 words and more. It is an intermediate between
"or" and "and" as it requires just 2 matching words:
|
sensitive |
logical. |
perl |
logical. Used only if |
fixed |
logical. |
agrep |
logical. For approximate matching, use |
max.distance |
integer or numeric. See |
costs |
NULL or list. See |
crandb |
data.frame |
tvdb |
list. The list of the task views. |
A list with the following vectors:
spkgs: The selected packages that contain the keyword(s).
inTV: The packages that contain the keyword(s) already refereed in the task view.
notinTV: The packages that contain the keyword(s) not (yet) refereed in the task view.
inTV_in: Among the packages available in the task view, those installed in the computer.
inTV_un: Among the packages available in the task view, those not installed in the computer.
notinTV_in: Among the packages not refereed in the task view, those installed in the computer.
notinTV_un: Among the packages not refereed in the task view, those not installed in the computer.
### TASK VIEW MAINTENANCE (tvdb + crandb)
## In real life, download crandb and tvdb from CRAN or load them from your directory
## with functions crandb_down(), crandb_load(), tvdb_down(), tvdb_load().
## In this example, we use small files.
crandb_load(system.file("data", "zcrandb.rda", package = "RWsearch"))
tvdb_load(system.file("data", "ztvdb.rda", package = "RWsearch"))
## List the task views
tvdb_vec()
## Search for the recent packages in crandb that contain the keyword
## and verify the packages already refereed in the task view.
(lst <- s_crandb_tvdb("distribution", tv = "Distributions", from = "2018-01-01"))
if (interactive()) {
p_display7(lst[c("inTV", "notinTV")], dir = file.path(tempdir(), "scrandbtvdb"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.