HertieDataScience / SyllabusAndLectures

Hertie School of Governance Introduction to Collaborative Social Science Data Analysis
MIT License
37 stars 60 forks source link

Eurostat package, error #113

Open Camila-RV opened 7 years ago

Camila-RV commented 7 years ago

Hey guys, We're trying to get data from Eurostat package. After following the CRAN instructions of suggested library packages and vignettes, it is still showing the same error.

Here is the code:

id <- search_eurostat('Energy technologies patent applications to 
                      the EPO by priority year', type = 'dataset')$code[1]

Error: 'cols' is not an exported object from 'namespace:readr'

Also tried using the code available on data set details:

dat <- get_eurostat('pat_ep_nrgpct')

Error: 'cols' is not an exported object from 'namespace:readr'

Thanks in advance!

christophergandrud commented 7 years ago

Hi,

Two quick observations. Your search_eurostat returns an empty data frame (it doesn't find any data sets). So if you try to select the 1st row of the code column. You won't get anything.

So try id <- search_eurostat('energy', type = 'dataset')

That being said, I ran the second line of code and got the data.

The error you are getting means that the version of the readr package you have doesn't have a needed function called cols. This is probably because your version of the package is out of date. I would suggest updating all of your packages and re-running it. In RStudio:

screen shot 2016-11-09 at 13 46 36

Hope that helps!