Learn R Programming

stoRy (version 0.2.2)

lto: Work with LTO versions

Description

[Maturing]

Download, configure, view metadata about, and navigate among different LTO versions.

which_lto() returns a length-one character vector corresponding to the active LTO version. This is the version that is loaded into the stoRy package environment. It is the demo version by default.

print_lto() prints basic LTO version metadata to console.

fetch_lto_version_tags() returns a character vector consisting of all exiting LTO version tags. The LTO versioned release tags are downloaded from the Theme Ontology GitHub website at https://github.com/theme-ontology/theming/releases.

lto_version_statuses() prints to console the status (available for download/cached/defunct) for each LTO version.

configure_lto() downloads and configures LTO version releases hosted on the Theme Ontology website at https://www.themeontology.org/data.

set_lto() sets an LTO version as the active version. This means that package functions will act on this version. The active version is set to demo by default.

Usage

which_lto()

print_lto()

fetch_lto_version_tags(verbose = TRUE)

lto_version_statuses(verbose = TRUE)

configure_lto( version, verbose = TRUE, overwrite_json = FALSE, overwrite_rds = FALSE )

set_lto(version, verbose = TRUE, load_background_collection = TRUE)

Arguments

verbose

A logical value indicating whether status messages should be output to console.

version

A length-one character vector specifying an LTO version tag. Set to "latest" to configure the latest numbered version, and "dev" to configure the LTO developmental version.

overwrite_json

A logical value indicating whether previously downloaded JSON files (if any) should be re-downloaded and overwritten.

overwrite_rds

A logical value indicating whether previously generated Rds files (if any) should be regenerated and overwritten.

load_background_collection

[Experimental] A logical value indicating whether the default background collection of all LTO thematically annotated stories should be loaded into the stoRy package environment when activating an LTO version. Setting this to FALSE may result in some analysis functions not working.

References

Paul Sheridan, Mikael Onsjö, and Janna Hastings, The Literary Theme Ontology for Media Annotation and Information Retrieval, Proceedings of JOWO2019: The Joint Ontology Workshops, Graz, Austria, September 22-26 (https://ceur-ws.org/Vol-2518/paper-WODHSA8.pdf).

See Also

Run lto-demo to view the LTO demo data help page.

Run print_stoRy_cache_info() to list all cached files.

Examples

Run this code
if (FALSE) {
# Check which LTO version is active:
which_lto()

# Print summary info about active LTO version to console:
print_lto()

# Print summary of existing LTO versions:
fetch_lto_version_tags()

# Store LTO version tags as a character vector:
lto_version_tags <- fetch_lto_version_tags()
lto_version_tags

# Configure the latest LTO version, only if it is not already setup:
configure_lto(version = "latest")

# Reconfigure the latest LTO version from scratch:
configure_lto(version = "latest", overwrite_json = TRUE, overwrite_rds = TRUE)

# Change to latest LTO version:
set_lto(version = "latest")
}

Run the code above in your browser using DataLab