Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
munozedg opened this issue Feb 6, 2024 · 2 comments

Comments

@munozedg
Copy link

munozedg commented Feb 6, 2024

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:

labels = ", parse(text = paste0("c(", var_radio[var_radio$field_name %in% i, "labels"] %>% as.character, ")")), '),

image

@jcarmezim
Copy link
Collaborator

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.

jcarmezim added a commit that referenced this issue Feb 6, 2024
Solved an error in _redcap_data()_ function while using the API connection to import data, which solves issue (#4).
@munozedg
Copy link
Author

munozedg commented Feb 6, 2024

Great! I will test it soon

@munozedg munozedg closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants