Package 'kitverse'

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

Help Index


Check whether this computer can run the KIT tools

Description

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.

Usage

kitverse_check(apps = TRUE, timeout = 120)

Arguments

apps

TRUE to really start the apps (about 5–30 seconds each).

timeout

How many seconds to wait for each app.

Value

A data frame (invisibly): item, status ("ok", "fail", "note"), detail.

Examples

if (interactive()) kitverse_check()

Conflicts between the core packages and other attached packages

Description

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().

Usage

kitverse_conflicts(only = kv_core())

Arguments

only

Only these core packages (default: all of them that are attached).

Value

A data frame that prints one line per conflict: name, winner (the package in use), losers (the masked packages).

Examples

kitverse_conflicts()

Install pandoc if R cannot find one

Description

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.

Usage

kitverse_pandoc(force = FALSE)

Arguments

force

TRUE to install even when R already finds pandoc.

Details

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.

Value

The folder that holds pandoc (invisibly), or NULL when nothing could be installed.

Examples

if (interactive()) kitverse_pandoc()

The repositories packages are installed from

Description

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.

Usage

kitverse_repos()

Value

A named vector of URLs, ready for install.packages(repos = ).

Examples

kitverse_repos()

All packages kitverse needs

Description

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).

Usage

kitverse_requirements(roots = "kitverse", lib.loc = NULL)

Arguments

roots

The packages to start from.

lib.loc

Package libraries (default .libPaths()).

Value

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).

Examples

req <- kitverse_requirements()
req[!req$ok, ]

Install missing packages and update packages that are too old

Description

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.

Usage

kitverse_update(all = FALSE, rounds = 4, quiet = FALSE)

Arguments

all

TRUE to also update packages that have a newer version in the repositories (not only those that are too old).

rounds

At most how many rounds.

quiet

TRUE to hide the installation output.

Details

A freshly installed R has no personal package library yet; this creates it first (R_LIBS_USER).

Value

The packages installed or updated (invisibly).

Examples

if (interactive()) kitverse_update()