ctv (version 0.8-5)

ctv-server: CRAN Task Views: Tools for Maintainers

Description

Server-side tools for maintaining CRAN task views.

Usage

read.ctv(file)

ctv2html(x, file = NULL, css = "../CRAN_web.css", packageURL = "../packages/", reposname = "CRAN")

check_ctv_packages(file, repos = TRUE, …)

repos_update_views(repos = ".", css = "../CRAN_web.css", reposname = "CRAN", …)

Arguments

file

character specifying a file path: for read.ctv a CRAN task view .ctv file, and for ctv2html the corresponding output .html file.

x

an object of class "ctv" as returned by read.ctv.

css

character specifying the path and name of the cascade style sheet that should be included in the HTML files.

packageURL

character specifying the path (relative to the view directory) to the package descriptions.

reposname

character giving the name of the CRAN-style repository, used for generating HTML pages.

repos

character, the base URL of the CRAN-style repository where the Views.rds and .html files should be installed. The .ctv files should be located in the web/views/ directory.

further arguments passed to available.packages or ctv2html, respectively.

Value

updateViews returns an object of class "ctvlist" containing the "ctv" objects available.

ctv2html returns invisibly a vector with the HTML code generated.

read.ctv returns a list of class "ctv" with elements:

name

character, name of the task view (must be a valid name for an R object).

topic

character, topic of the task view.

maintainer

character, maintainer of the task view.

email

character, valid e-mail address (optional).

version

character, version specified via date in ISO format.

url

character, valid task view URL (optional).

info

character, HTML code with informations about the task view.

packagelist

data frame with the columns name (character, name of package) and core (logical, Is priority core?).

links

character vector, HTML code with links for the task view.

Details

CRAN Task views are generated from an XML-based format .ctv that is described in the vignette of this package.

read.ctv can read a .ctv file with a CRAN task view specification and returns an object of class "ctv". This functions requires the availability of the XML package.

ctv2html generates a .html file with the information contained in a "ctv" object.

check_ctv_packages checks whether the info and packagelist sections of the .ctv file are consistent with each other and whether all packages are available from the repository.

repos_update_views reads all .ctv files in a specified directory, generates a .html file for each and an index .html file. Furthermore, it stores all "ctv" objects in a "ctvlist" object in a file Views.rds that can be queried by install.views or CRAN.views.

References

Zeileis A (2005). CRAN Task Views. R News, 5(1), 39--40. https://CRAN.R-project.org/doc/Rnews/.

See Also

install.views

Examples

Run this code
# NOT RUN {
## read .ctv file
x <- read.ctv(system.file("ctv", "Econometrics.ctv", package = "ctv"))
x

# }
# NOT RUN {
## generate corresponding .html file
ctv2html(x)

## check packagelist
check_ctv_packages(x)
# }

Run the code above in your browser using DataCamp Workspace