bruigtp / REDCapDM

R package to perform data management of REDCap datasets in R
https://bruigtp.github.io/REDCapDM/
Other
4 stars 0 forks source link

Error when calling the function `redcap_data` with parameters `uri` and `token` #4

Closed munozedg closed 8 months ago

munozedg commented 8 months ago

After using the function redcap_data:

redcap_data(uri = "https://redcap.my.server/REDCap/api/", token = "MYSECRETTOKEN")

I am getting this error:

Importing in progress...
Almost done...                                                                                                                                      
Error in parse(text = paste0("c(", var_radio[var_radio$field_name %in%  :                                                                           
  <text>:1:43: unexpected symbol
1: c('5 years ', '10 years ', 'Other ', 'Don't
                                              ^
Called from: parse(text = paste0("c(", var_radio[var_radio$field_name %in% 
    i, "labels"] %>% as.character, ")"))

Likely, line 234 is not able to parse apostrophes inside apostrophes:

https://github.com/bruigtp/REDCapDM/blob/c06c6700e3d3cb729d1c6fa59a53fae22a3923b6/R/redcap_data.R#L234

image

jcarmezim commented 8 months ago

Hi @munozedg,

We have resolved this issue and we will update the package on both CRAN and Github. Tomorrow the new version should be available on both sites.

Thank you for using REDCapDM and for your feedback which helped us to improve the package.

If you encounter any more bugs, please do not hesitate to contact us.

Thank you again.

munozedg commented 8 months ago

Great! I will test it soon