Binequality

Los datos están histogramizados... ¿quién los deshisotogramizará?

Hace un tiempo quise hacer cosas malísimas con datos fiscales de España y Dinamarca. Pero los datos estaban histogramizados: Gracias a Freakonometrics di con binequality. Adaptando su código, escribo library(rvest) library(plyr) dk <- read_html("http://www.skm.dk/english/facts-and-figures/progression-in-the-income-tax-system") tmp <- html_nodes(dk, "table") tmp <- html_table(tmp[[2]]) header <- tmp[1,] tmp <- tmp[-c(1, 2),] colnames(tmp) <- header # elimino declaraciones negativas tmp <- tmp[-1,] # elimino el total tmp <- tmp[-(nrow(tmp)),] colnames(tmp) <- c("rango", "contribuyentes", "X1", "income", "tax1", "tax2", "pct") irpf_dk <- tmp[, c("rango", "contribuyentes", "income", "tax1", "tax2")] irpf_dk$contribuyentes <- as.