Server-side tools for maintaining CRAN task views.

read.ctv(file, ...)

ctv2html(x, file = NULL, cran = FALSE,
  css = NULL, packageURL = NULL, reposname = "CRAN")

check_ctv_packages(file, repos = TRUE, ...)

repos_update_views(repos = ".", cran = TRUE,
  css = NULL, reposname = "CRAN", ...)



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


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


logical. Is the HTML to be hosted on CRAN?


character specifying the path and name of the cascade style sheet that should be included in the HTML files (if any). The default is "../CRAN_web.css" if cran = TRUE and NULL otherwise.


character specifying the path (relative to the view directory) to the package descriptions. The default is "" if cran = FALSE and "../packages/" otherwise.


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


character, the base URL of the CRAN-style repository where the Views.rds and .html files should be installed. The task view files should be located in the web/views/ directory. If repos = TRUE (default) the official CRAN repository is used and checks for archived packages are included.


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


CRAN Task views are generated from an R/Markdown-based file format that is described in the vignette of this package. (Previous versions used an XML-based format which is still fully supported in all functions.)

read.ctv can read a file with a CRAN task view specification and returns an object of class "ctv". This functions requires the availability of the knitr/rmarkdown packages (or the xml2 package, respectively, for the legacy XML format).

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 task view file are consistent with each other and whether all packages are available from the repository.

repos_update_views reads all task view 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.


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

ctv2html returns invisibly a vector with the HTML code generated.

check_ctv_packages returns a list of character vectors with package names.

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


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


character, topic of the task view.


character, maintainer of the task view.


character, valid e-mail address (optional).


character, version specified via date in ISO format.


character, valid task view URL (optional).


character, source repository where the task view file is maintained (optional).


character, HTML code with informations about the task view.


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


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


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


citation object inheriting from bibentry with information how to cite the task view.

See also


## task view file shipped within the package
ctv <- system.file("ctv", "", package = "ctv")

if(require("knitr") & require("rmarkdown")) {
## read task view file
x <- read.ctv(ctv)

## print
#> Loading required package: knitr
#> Loading required package: rmarkdown
#> CRAN Task View
#> --------------
#> Name:       Econometrics
#> Topic:      Econometrics
#> Maintainer: Achim Zeileis, Grant McDermott, Kevin Tappe
#> Contact:
#> Version:    2022-09-13
#> Source:
#> Packages:   AER*, alpaca, aod, apollo, apt, bayesm, betareg, bife, bimets, BMA,
#>             BMS, boot, bootstrap, brglm, CADFtest, car*, CDNmoney, censReg,
#>             clubSandwich, clusterSEs, collapse, crch, decompr, dlsem, DoubleML,
#>             dynlm, Ecdat, effects, erer, estimatr, expsmooth, ExtremeBounds,
#>             feisr, fixest*, fma, forecast*, frm, frontier, fwildclusterboot,
#>             fxregime, gam, gamlss, geepack, gets, glmx, gmm, gmnl, gravity,
#>             grf, gvc, hdm, Hmisc, ineq, ivprobit, ivreg*, LARF, lavaan, lfe,
#>             LinRegInteractive, lme4, lmtest*, lpirfs, marginaleffects*,
#>             margins, MASS, matchingMarkets, Matrix, Mcomp, meboot, mfx, mgcv,
#>             mhurdle, micEcon, micEconAids, micEconCES, micEconSNQP, midasr,
#>             mlogit, MNP, modelsummary, multiwayvcov, nlme, nnet, NNS, nonnest2,
#>             np, nse, ordinal, OrthoPanels, pampe, panelvar, pco, pcse, pder,
#>             pdR, pdynmc, pglm, plm*, pscl, psidR, pwt, pwt8, pwt9, quantreg,
#>             RATest, Rchoice, rdd, rddensity, rdlocrand, rdmulti, rdpower,
#>             rdrobust, reldist, REndo, rms, RSGHB, sampleSelection, sandwich*,
#>             segmented, sem, semsfa, simpleboot, SparseM, spatialprobit,
#>             spatialreg, sphet, splm, spsur, ssfa, ssmrob, SteinIV, strucchange,
#>             survival, systemfit, truncreg, tsDyn, tseries*, urca*, vars, VGAM,
#>             wbstats, wooldridge, xts, zoo*, zTree
#>             (* = core package)

if (FALSE) {
## generate corresponding .html file from task view object
## or equivalently from task view file

## check packagelist