I am trying to as.integer() the 2nd column. This doesn't work, because of the white space. Unfortunately all attempts to remove that white space failed, too. How is this done?
library(tidyverse)
url <- "https://www.destatis.de/DE/Themen/Staat/Oeffentliche-Finanzen/Schulden-Finanzvermoegen/Tabellen/03-2021-vorlaufiger-schuldenstand-laender.html"
content <- rvest::read_html(url)
content %>%
html_table(fill = TRUE) %>%
pluck(1) %>%
`[`(4:19,1:2) %>%
rename(Schulden = 2)