bluefoxr / COINr

COINr
https://bluefoxr.github.io/COINr/
Other
25 stars 7 forks source link

Error using COINr functions after successful assemble() #55

Closed jenifav closed 4 months ago

jenifav commented 5 months ago

Hi, I am just learning about constructing composite indicators and have done so manually but wanted to use your interesting package to see how well I did manually and to learn more about it. However, I've run into an issue. I was able to use assemble() successfully and received no errors. But when I tried to plot the framework I got the following error:

Error in effectiveWeight(COIN) : Input data type not recognised. Should be COIN object or list of indmeta/aggmeta data frames.

Now, when I run class() on the object I assembled I get:

[1] "tbl_df" "tbl" "data.frame"

I must be doing something wrong!

Thanks!

bluefoxr commented 5 months ago

Hi, are using COINr6? In any case I would recommend to use COINr - please follow examples here for effective weights: https://bluefoxr.github.io/COINr/articles/weights.html?q=effe#effective-weights

The input to the function should normally be a coin. It looks like somehow you are inputting a tibble data frame so you need to fix the input.

jenifav commented 5 months ago

I am using COINr6 with assemble(). I get all the output from that telling me it successfully ran but somehow my installation of R is only recognizing it as a tibble after that. I will look over that link but also try using COINr. Thanks!