I’m having trouble with a R data frame where I pulled data from XBRL. One variable named “fact” contains HTML code. As you can see in the following table:
| endDate | fact |
| ——– | ——– |
|2022-12-31| “`
`
Saldo al 31/12/2022 Saldo al 31/12/2021 Variazioni 10.256.176 6.106.438 4.149.738 `
“` |
Code represent a 2X3 table
I tried to export in pdf, xlsx and html
write_xlsx(
df,
path = ‘//UN/PA/UND/UND_C/xbrl/test.xlsx’,
col_names = TRUE,
format_headers = TRUE,
use_zip64 = FALSE)
library(gridExtra)
pdf(‘//UN/PA/UND/UND_C/xbrl/test.pdf”, height=11, width=10)
grid.table(df)
dev.off()
and so on…
I expect to have the following result
endDate | fact | |
---|---|---|
2022-12-31 | Balance at 31/12/2022 | Variations |
10,256,176 | 4,149,738 |
The result, however, it is always similar to the image attached.
html code trouble
Guido Borà is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.