| Title: | Install and Load the KIT Research Tools in One Step |
|---|---|
| Description: | One package that installs the KIT research tools and everything they need: 'kits' (item calibration, linking and scoring), the 'shiny' apps 'kitsUI' and 'kitJoin', and the shared interface package 'kitDesign'. It checks the computer (R version, package library, package versions, and whether each app really starts) and updates packages that are missing or too old. Like 'tidyverse', library(kitverse) attaches the core packages and lists their versions and conflicts; the apps are then started with their own run_kitsui() and run_kitjoin(). Loading the 'kitverse' namespace loads none of the other packages, so the check and the update still work when a package is broken. |
| Authors: | Jie-Wen Tsai [aut, cre] |
| Maintainer: | Jie-Wen Tsai <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.4.3 |
| Built: | 2026-10-31 23:45:15 UTC |
| Source: | https://github.com/jiewenTsai/kitverse |
One line per item: the R version, whether the package library is writable, whether every package is installed and new enough, whether the packages load, the Linux system libraries, the temporary folder, and the internet connection used for fonts. Finally it really starts kitsUI and kitJoin (in a separate R, without a browser) and checks that each page comes back. Ask workshop participants to run it once beforehand and send a screenshot.
kitverse_check(apps = TRUE, timeout = 120)kitverse_check(apps = TRUE, timeout = 120)
apps |
|
timeout |
How many seconds to wait for each app. |
A data frame (invisibly): item, status ("ok", "fail", "note"), detail.
if (interactive()) kitverse_check()if (interactive()) kitverse_check()
Lists functions in the core packages (kits, kitsUI, kitJoin, kitDesign) that have the same
name as a function in another attached package: which one wins and which ones are masked.
Writing the prefix (kits::) always gets that package's version. library(kitverse) prints
this, like tidyverse_conflicts().
kitverse_conflicts(only = kv_core())kitverse_conflicts(only = kv_core())
only |
Only these core packages (default: all of them that are attached). |
A data frame that prints one line per conflict: name, winner (the package in use),
losers (the masked packages).
kitverse_conflicts()kitverse_conflicts()
Saving a plot as one html file (the plot downloads in kitsUI) needs pandoc. RStudio and Quarto
come with it; a computer with only R has none. When R cannot find pandoc, this downloads it
(about 20–40 MB) into kitverse's data folder and adds RSTUDIO_PANDOC to the user's
~/.Renviron, so every new R session finds it. kitverse_update() calls this.
kitverse_pandoc(force = FALSE)kitverse_pandoc(force = FALSE)
force |
|
options(kitverse.pandoc_url = ) replaces the download folder (for example an offline copy
at the workshop); it must hold the same file names as the pandoc GitHub release.
The folder that holds pandoc (invisibly), or NULL when nothing could be installed.
if (interactive()) kitverse_pandoc()if (interactive()) kitverse_pandoc()
The KIT packages come from r-universe (https://jiewentsai.r-universe.dev), everything else
from CRAN; on Ubuntu and Debian, CRAN is replaced by Posit Package Manager's pre-built packages.
options(kitverse.repo = ) replaces r-universe (for example with an offline repository at
the workshop), and options(kitverse.cran = ) replaces CRAN.
kitverse_repos()kitverse_repos()
A named vector of URLs, ready for install.packages(repos = ).
kitverse_repos()kitverse_repos()
Starting from roots (kitverse itself by default), reads the DESCRIPTION of the installed
packages and finds every package needed directly or indirectly, the minimum version required,
and the installed version. A package that is not installed has no DESCRIPTION to read, so the
packages below it show up only after it is installed (kitverse_update() repeats until nothing
is missing).
kitverse_requirements(roots = "kitverse", lib.loc = NULL)kitverse_requirements(roots = "kitverse", lib.loc = NULL)
roots |
The packages to start from. |
lib.loc |
Package libraries (default |
A data frame: pkg, min (minimum version, NA when none), have (installed version,
NA when not installed), ok (installed and new enough), why (the reason when not ok).
req <- kitverse_requirements() req[!req$ok, ]req <- kitverse_requirements() req[!req$ok, ]
Finds the packages kitverse needs that are not installed or older than required
(kitverse_requirements()) and installs them from kitverse_repos(). A newly installed
package may need further packages, so this repeats until nothing is missing (at most
rounds times). The installation runs in a separate R process, so it does not matter what
the current R session has loaded.
kitverse_update(all = FALSE, rounds = 4, quiet = FALSE)kitverse_update(all = FALSE, rounds = 4, quiet = FALSE)
all |
|
rounds |
At most how many rounds. |
quiet |
|
A freshly installed R has no personal package library yet; this creates it first
(R_LIBS_USER).
The packages installed or updated (invisibly).
if (interactive()) kitverse_update()if (interactive()) kitverse_update()