Description Usage Arguments Value Examples
Find if a string refers to a person, and if so, finds gender by searching Wikidata
1 2 3 |
search |
The query to be searched. |
language |
Two letters language codes to be passed to WikiData to determine search results; it works similarly as looking in the corresponding version of Wikipedia. |
description_language |
The language in which preferably to return the description as a two letter code. If not available, defaults to English. If English is not available, defaults to the language used to search in Wikidata. If not available, it returns NA. |
cache |
Logical, defaults to TRUE. IF TRUE, it stores data on the search string and the resulting Wikidata object. Data are stored inside a 'wikidata' folder (if it does not exist, it is automatically created). |
wait |
Numeric, defaults to 0.1. Waiting time between queries, relevant when making a large number of queries. |
only_cached |
Logical, defaults to FALSE. If TRUE, it only uses locally cached information. |
exclude_without_uppercase |
Logical, degaults to TRUE. If the search string does not include any upper case letter, then assume it's not a person. |
quietly |
Logical, defaults to FALSE. If TRUE, no warning message appears when no relevent Wikidata entry is found. |
A data.frame (a tibble) with one row and four columns: Query, Gender, Description, and WikidataID
1 | find_gender(search = "Garibaldi", language = "it")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.