Generic data parser / as.data.frame(), error when no obs Key values
Closed this issue · 6 comments
When running
unemployment_rate_1 <- readSDMX(providerId = "LSD", resource = "data", flowRef = "S3R348_M3030001_1", dsd = TRUE)
unemployment_rate_1 <- as.data.frame(unemployment_rate_1 , labels = TRUE)
results in error:
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
arguments imply differing number of rows: 0, 1
The same error occurs when running:
df_unemployment_rate_url_1 <- "https://osp-rs.stat.gov.lt/rest_xml/data/S3R348_M3030001_1"
unemployment_rate_1 <- readSDMX(df_unemployment_rate_url_1)
unemployment_rate_1 <- as.data.frame(unemployment_rate_1)
Is the cause of this error the data from LSD itself / could it be fixed locally?
Thanks for any help!
@justasmundeikis ASAP I check this, apparently I miss something in the generic data parser.
@justasmundeikis I've just pushed some minor fix. Can you please reinstall and test if it works now?
@eblondel yes, can be closed.
Thanks a lot.
Great @justasmundeikis don't forget to star rsdmx if it helps for your work ;-)
Hi @eblondel , bad news, the bug appears again:
#downloading data
S8R394_M4020201 <- readSDMX(providerId = "LSD", resource = "data", flowRef="S8R394_M4020201", dsd = TRUE)
#parsing data
S8R394_M4020201 <- as.data.frame(S8R394_M4020201 , labels = TRUE)
Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 1, 0
working on the newest version of rsdmx
Hi @justasmundeikis I've checked and it seems a different issue that i've referenced here #146