Displaying 1 result from an estimated 1 matches for "stedtype".
2017 Nov 30
2
Help avoiding setting column type two times
...The code is below but I have also put the code at this place:
http://20dage.dk/R/referendum-2009/convert_from_xml.R
Best Regards
Martin M. S. Pedersen
-------
library(xml2)
convert_one_file <- function(url) {
x <- read_xml(url)
Sted <- xml_find_first(x, ".//Sted")
StedType <- xml_attr(Sted, "Type")
StedTekst <- xml_text(Sted)
Parti <- xml_find_all(x, ".//Parti")
PartiId <- xml_attr(Parti, "Id")
PartiBogstav <- xml_attr(Parti, "Bogstav")
PartiNavn <- xml_attr(Parti, "Navn")...