The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
CRAN Task Views Documentation
Achim Zeileis
Overview
For more details on how to use task views and how to contribute to
them, see the repository of the CRAN Task Views
Initiative.
Details
Main text
The information in the main text should be a short description of the
packages, explaining which packages are useful for which tasks. Standard Markdown
format can be used to structure the document with sections, itemized
and enumerated lists, bold face, italics, etc.
Additionally, short R code chunks with special functions are used for
linking to resources in the same repository: pkg()
for
regular packages, pkg(..., priority = "core")
for important
“core” packages, and view()
for related task views. A
convenience function doi()
creates links for DOIs (digital
object identifiers).
The distinction between “regular” and “core” packages is only
important for the installation of CRAN task views because the user can
specify whether all packages (default) or only the most important core
packages should be installed (with all their dependencies).
If a core package is mentioned several times in the document, it
is sufficient to indicate priority = "core"
for one of the
occurrences.
Rather than linking to another task view as a whole, e.g.,
view("Econometrics")
, it is also possible to link to
specific sections of that view, e.g.,
view("Econometrics", "Instrumental variables")
.
Moreover, code projects in other repositories can be linked by using
the functions:
Note however that CRAN task views are intended mainly for packages on
CRAN (as the name conveys). Thus, links to other repositories should be
used for important packages/projects but not list all
potentially relevant repositories. Also, it is not necessary to list the
GitHub projects for all listed CRAN packages as these are typically
provided on the package’s CRAN web page.
Links
All CRAN packages included with the pkg()
function will
be listed in a dedicated list below the information text when rendering
the HTML version of the task view. Also, the task views as well as
packages/projects in other repositories will be included automatically
in the list of links at the end of the HTML version.
Finally, additional links - e.g., to books, papers, blogs, interest
groups, mailing lists, etc. - can be included in the
### Links
section at the end of the file in a standard
itemized list. As explained above this list of links will be
complemented automatically with links generated from the functions
view()
, bioc()
, github()
,
etc.
Working with task view files in R
To check whether a task view file has been formatted properly it can
be read into R and printed. This should display the metainformation and
the list of packages. Subsequently, it can be rendered to an HTML page
and displayed in a browser for checking whether the information text is
processed correctly. Finally, the function
check_ctv_packages()
can be used to check whether some of
the listed packages are actually not available on CRAN or not currently
maintained (archived).
For illustration, the code below employs the
Econometrics.md
file shipped within the ctv
package. Instead a local MyTopic.md
with resulting
MyTopic.html
could be used as well.
library("ctv")
file.copy(system.file("ctv", "Econometrics.md", package = "ctv"), "Econometrics.md")
ctv2html("Econometrics.md", cran = TRUE)
browseURL("Econometrics.html")
check_ctv_packages("Econometrics.md")
Note that the code above is intended for authors of CRAN task views.
For end-users the functions ctv()
,
available.views()
, install.views()
, and
update.views()
are relevant. See https://github.com/cran-task-views/ctv/ for more
details.
Dealing with archived packages
The CRAN packages listed in task views should ideally be maintained
actively, so that improved versions are released by the corresponding
maintainers in case the daily CRAN checks discover any issues.
However, it is not straightforward to test for active maintenance
fully automatically and even actively maintained packages may be
temporarily archived on CRAN. Hence, the following strategy is
adopted:
When a CRAN package from a task view is archived, it is still
listed in the task view like before. It is only flagged as archived in
the text and not installed automatically anymore by
install.views()
and update.views()
.
If the package is still archived after (more than) 60 days, CRAN
creates an issue in the GitHub repository of the task view (as in this
example).
At this point the task view maintainers can decide to
- exclude the package from the task view immediately, e.g.,
if they feel it had not been that relevant and/or not been updated in a
very long time;
- reach out to the package maintainer to help with releasing
an improved version; or
- wait some more for an improved version, e.g., when they see
that the package maintainers already started addressing the
problem.
If the package is still archived after (more than) 100 days, CRAN
follows up on the issue and requests removal of the package from the
task view. (For sufficiently relevant packages it may be sensible to
replace the pkg()
link by a github()
link in
the task view.)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.