Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use function "get_data_structure"

Tags:

r

I try to use the function "get_data_structure" but got an error as below. Could anyone know how to fix it?

Thank you in advance

get_data_structure("DUR_D") Error in data.frame(data_structure@concepts) : trying to get slot "concepts" from an object (class "data.frame") that is not an S4 object

like image 330
Lejpang Avatar asked Nov 16 '25 10:11

Lejpang


2 Answers

The problem appears to be a bug in the version of the OECD package on CRAN. If you install the development version, it works. First, close R and reopen a clean new session, then run this:

remotes::install_github("https://github.com/expersso/OECD")

library(OECD)
get_datasets()
get_data_structure("DUR_D")
like image 139
user2554330 Avatar answered Nov 18 '25 05:11

user2554330


It is a bug in the package OECD 0.2.5.

It works with the package version 0.2.4 which you can install from CRAN's archived package section (https://cran.r-project.org/src/contrib/Archive/OECD).

If you want to access the archived package version directly in R, use the following code:

devtools::install_version("OECD", version = "0.2.4", repos = "https://stat.ethz.ch/CRAN/")

Note that this requires the package 'devtools' to be installed.

like image 24
hyman Avatar answered Nov 18 '25 05:11

hyman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!