| Title: | Access the Liking Rating Database |
|---|---|
| Description: | Download and work with the Liking Rating Database, a curated collection of subjective liking ratings from published decision-making studies, described in Fernandez, Goyal and Krajbich (2026) <doi:10.5281/zenodo.22216442>. Data is read from versioned release files and cached for the session, so a pinned version returns the same rows regardless of when it is run. Provides access by dataset, by item across studies, or as the whole corpus, together with the metadata and citations needed to report it. |
| Authors: | Kianté Fernandez [aut, cre, cph] |
| Maintainer: | Kianté Fernandez <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.2 |
| Built: | 2026-10-16 07:46:45 UTC |
| Source: | https://github.com/liking-initiative/likinginitiative-r |
BibTeX for a dataset's source publication
bibtex(x, ...)bibtex(x, ...)
x |
A dataset from |
... |
Unused. |
A character string holding a BibTeX entry.
bibtex(get_dataset("leeholyoak2021"))bibtex(get_dataset("leeholyoak2021"))
Shows where downloaded release files are kept, how much space they use, and which versions are present.
cache_info()cache_info()
A list, invisibly, with path, bytes and versions.
cache_info()cache_info()
Please cite both the database and the study whose data you used.
cite(x, ...)cite(x, ...)
x |
A dataset or item from |
... |
Unused. |
A character string.
cite()cite()
Delete cached release files
clear_cache(version = NULL)clear_cache(version = NULL)
version |
Version to remove. |
Invisibly, the number of bytes freed.
clear_cache()clear_cache()
Reads a dataset's ratings from the release, with the metadata needed to interpret them.
get_dataset(dataset, version = "latest", timepoint = NULL)get_dataset(dataset, version = "latest", timepoint = NULL)
dataset |
A dataset code ( |
version |
Release version, or |
timepoint |
Optional rating phase to keep. |
Two datasets repeat their rating phase – leeholyoak2021 (phases 1-3) and
leehare2023exp2 (phases 1-2). For those, subject_id and item_id
together are not unique; include timepoint, or pass the timepoint
argument to take a single phase.
An object of class likingInitiative_dataset with elements data (a
tibble), metadata, dataset_code and version. For several datasets, a
named list of them.
d <- get_dataset("leeholyoak2021") head(d$data) d$metadata$rating_scale_max cite(d)d <- get_dataset("leeholyoak2021") head(d$data) d$metadata$rating_scale_max cite(d)
The cross-study view. Because the underlying studies use different response
scales, compare on normalized_rating, not rating.
get_item(item, version = "latest")get_item(item, version = "latest")
item |
An item name, e.g. |
version |
Release version, or |
Only the first rating phase of a repeated-phase dataset is included, so those studies do not carry extra weight in a cross-study comparison.
An object of class likingInitiative_item with data, datasets and
version.
k <- get_item("kitkat") k$datak <- get_item("kitkat") k$data
timepoints gives the rating phases a dataset holds. All but two datasets
have a single phase; see get_dataset().
list_datasets(version = "latest")list_datasets(version = "latest")
version |
Release version, or |
A tibble with one row per dataset.
list_datasets()list_datasets()
List the stimuli in the database
list_items(version = "latest")list_items(version = "latest")
version |
Release version, or |
A tibble with one row per item.
list_items()list_items()
List the publications in the database
list_studies(version = "latest")list_studies(version = "latest")
version |
Release version, or |
A tibble with one row per study.
list_studies()list_studies()
The whole corpus in one call
load_database(version = "latest")load_database(version = "latest")
version |
Release version, or |
A list of tibbles: ratings, studies, datasets, items. Held
in memory after the first call.
db <- load_database() nrow(db$ratings)db <- load_database() nrow(db$ratings)
Version, date and headline counts for the release in use
release_info(version = "latest")release_info(version = "latest")
version |
Release version, or |
A list describing the release.
release_info()release_info()
By default release files are cached inside the session's temporary directory, so nothing is written outside it and the cache goes away when R exits. Call this to cache in a directory that persists instead, so a later session reuses the files rather than downloading them again.
use_persistent_cache(dir = tools::R_user_dir("likingInitiative", "cache"))use_persistent_cache(dir = tools::R_user_dir("likingInitiative", "cache"))
dir |
Directory to cache in. Defaults to this package's per-user cache
directory, as given by |
The choice lasts for the session. Put
likingInitiative::use_persistent_cache() in your .Rprofile to make it
the default for every session, and use clear_cache() to remove what it
has stored.
The cache directory, invisibly.
# cache somewhere disposable for the rest of this session use_persistent_cache(tempfile("likingInitiative-cache-"))# cache somewhere disposable for the rest of this session use_persistent_cache(tempfile("likingInitiative-cache-"))