tw_extract_single: Extract item data from a list object retrieved from the...

View source: R/tw_extract.R

tw_extract_singleR Documentation

Extract item data from a list object retrieved from the Wikidata API

Description

This function is mostly used internally and for testing.

Usage

tw_extract_single(w, language = tidywikidatar::tw_get_language())

Arguments

w

A list, typically retrieved with tw_get_item()

language

Defaults to language set with tw_set_language(); if not set, "en". Use "all_available" to keep all languages. For available language values, see the dedicated Wikimedia page.

Value

A data frame (a tibble) with four columns, such as the one created by tw_get().

Examples

#' Retrieving from tests, but normally:
# w <- tw_get_item(id = "Q180099")

tidywikidatar:::tw_extract_single(w = list(tw_test_items[["Q180099"]]))

tidywikidatar documentation built on Feb. 10, 2026, 1:07 a.m.