rpradosiqueira / sidrar

A R interface to IBGE's SIDRA API
87 stars 11 forks source link

Error: Missing value TRUE/FALSE needed #10

Closed dumontgoulart closed 3 years ago

dumontgoulart commented 3 years ago

Hi, I've been using this very useful tool for the past days, but apparently something happened and get_sidra does not seem to be working with me. Even when starting fresh, loading only the sidrar library and using the example command at this github page, it keeps returning the same error message Error in if (strsplit(path, " ")[[1]][2] == "P") { : missing value where TRUE/FALSE needed. I do not know if the problem is with me, or if there is an issue with the code or with some of its dependencies, but it would be great if anyone could provide some help here. Code below:


> library(sidrar)
> 
> get_sidra(x = 1419,
+           variable = 63,
+           period = c(last = "12"),
+           geo = "City",
+           geo.filter = 5002704,
+           classific = "c315",
+           category = list(7169),
+           header = FALSE,
+           format = 3)
Error in if (strsplit(path, " ")[[1]][2] == "P") { : 
  missing value where TRUE/FALSE needed

EDIT: I just tested on a different computer and the exact same error appeared.

biancagali commented 3 years ago

Hey, I'm having the same problem...

get_sidra(api="/t/3653/n1/all/v/3134/p/all") Error in if (strsplit(path, " ")[[1]][2] == "P") { : missing value where TRUE/FALSE needed

I also tested on a different computer and the problem is the same.

andrecvalerio commented 3 years ago

Same problem here. It was working just fine yesterday.

raphaelrrcoelho commented 3 years ago

Same problem here.

dacbarbosa commented 3 years ago

Same here

antoniopella commented 3 years ago

Same here

siqueira-ec commented 3 years ago

I submitted a PR to fix that issue, @rpradosiqueira

Could you accept it? I'm pretty sure that issue is affecting many people.

PR #11

Meanwhile, you all can use the fixed version following the instructions below.

On R console:

UNINSTALL CURRENT SIDRAR

remove.packages("sidrar")

REMOVE CURRENT SIDRAR VERSION FROM WORKSPACE

detach("package:sidrar", unload=TRUE)

INSTALL DEVTOOLS PACKAGE

install.packages("devtools")

GET FIXED VERSION FROM GITHUB

devtools::install_github("siqueira-ec/sidrar")
rpradosiqueira commented 3 years ago

Fixed. The problem was in the url.