1

Eurostat から大量のデータをダウンロードしようとして問題が発生しました。助けていただければ幸いです。この投稿からコードを基にしました。

library(devtools)
require(devtools)
install_github("rsdmx", "opensdmx")
require(rsdmx)

# Make a temporary file (tf) and a temporary folder (tdir)
tf <- tempfile(tmpdir = tdir <- tempdir())

## Download the zip file 
download.file("http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?sort=1&file=data%2Frd_e_gerdsc.sdmx.zip", tf)

## Unzip it in the temp folder
test <- unzip(tf, exdir = tdir)

sdmx <- readSDMX(test)

stats <- as.data.frame(sdmx)
head(stats)

この警告を受け取りましたが、データフレームは空です:

Warning message:
In if (attr(regexpr("<!DOCTYPE html>", content), "match.length") ==  :
  the condition has length > 1 and only the first element will be used
4

1 に答える 1