add missing function to genderequality

This commit is contained in:
2021-08-10 17:26:05 +02:00
parent f753920d34
commit c53d842a1e
+6
View File
@@ -52,6 +52,12 @@ by reading the gender from the master data of all members of parliament, which i
fetched from bundestag.de. fetched from bundestag.de.
```{r} ```{r}
xml_get <- function(node, name) {
res <- xml_text(xml_find_all(node, name))
if (length(res) == 0) NA_character_
else res
}
x <- read_xml("../inst/masterdata.xml") x <- read_xml("../inst/masterdata.xml")
mdbs <- xml_find_all(x, "MDB") mdbs <- xml_find_all(x, "MDB")