cldf: Reads a Cross-Linguistic Data Format dataset into an object.

View source: R/rcldf.R

cldfR Documentation

Reads a Cross-Linguistic Data Format dataset into an object.

Description

Reads a Cross-Linguistic Data Format dataset into an object.

included here to match people expecting e.g. readr::read_csv etc

Usage

cldf(
  mdpath,
  load_bib = FALSE,
  cache_dir = tools::R_user_dir("rcldf", which = "cache")
)

read_cldf(
  mdpath,
  load_bib = FALSE,
  cache_dir = tools::R_user_dir("rcldf", which = "cache")
)

Arguments

mdpath

the path to the directory or metadata JSON file.

load_bib

a boolean flag (TRUE/FALSE, default FALSE) to load the sources.bib BibTeX file. load_bib=FALSE can easily speed up loading of a CLDF dataset by an order of magnitude or two, so we do not load sources by default.

cache_dir

a directory to cache downloaded files to

Value

A cldf object

Examples

cldfobj <- cldf(system.file("extdata/huon", "cldf-metadata.json", package = "rcldf"))

SimonGreenhill/rcldf documentation built on July 4, 2025, 10:22 p.m.