tw_extract_qualifier: Extract qualifiers from a list created with 'tw_get_item()'

View source: R/tw_extract.R

tw_extract_qualifierR Documentation

Extract qualifiers from a list created with tw_get_item()

Description

This function is mostly used internally and for testing.

Usage

tw_extract_qualifier(id, p, w = NULL)

Arguments

id

A character vector of length 1, must start with Q, e.g. "Q254" for Wolfgang Amadeus Mozart.

p

A character vector of length 1, a property. Must always start with the capital letter "P", e.g. "P31" for "instance of".

w

A list, typically created with tw_get_item()

Value

A data frame (a tibble) with eight columns: id for the input id, property, qualifier_id, qualifier_property, qualifier_value, rank, qualifier_value_type, and set (to distinguish sets of data when a property is present more than once)

Examples

# w <- tw_get_item(id = "Q180099")

tw_extract_qualifier(id = "Q180099", p = "P26", w = list(tw_test_items[["Q180099"]]))

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