Clean Wikidata results by removing the "http://www.wikidata.org/entity/" prefix in all columns

clean_wikidata_table(wikitib)

Arguments

wikitib

a Wikidata results tibble

Examples

metro_query='SELECT ?item ?itemLabel ?coords { ?item wdt:P361 wd:Q1552; wdt:P625 ?coords . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } ORDER BY ?itemLabel ' tib=send_query(query=metro_query)
#> Error in send_query(query = metro_query): impossible de trouver la fonction "send_query"
clean_tib=clean_wikidata_table(tib)
#> Error in dplyr::mutate(., dplyr::across(tidyselect:::where(is.character), stringr::str_replace, pattern = "http://www.wikidata.org/entity/", replacement = "wd:")): objet 'tib' introuvable
clean_tib %>% head()
#> Error in head(.): objet 'clean_tib' introuvable