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

read reports #182

Closed
hatemhosny opened this issue Jan 7, 2018 · 5 comments
Closed

read reports #182

hatemhosny opened this issue Jan 7, 2018 · 5 comments
Assignees

Comments

@hatemhosny
Copy link
Contributor

how can I export reports created by the REDCap report builder?

great package, by the way 👍
thanks

@wibeasley wibeasley self-assigned this Jan 7, 2018
@wibeasley
Copy link
Member

thanks, @hatemhosny. Have you considered using redcapAPI::exportReports(). It's developed by my friend, @nutterb.

Once I establish a better testing framework (that hits multiple versions of REDCap), @nutterb and I intend to merge our two packages.

@nutterb
Copy link
Contributor

nutterb commented Jan 7, 2018

Please note that if you redcapAPI is out of date on CRAN. There were changes to the Hmisc package that require some updates that I haven't gotten published yet. If you wish to use redcapAPI, I would recommend using

devtools::install_github("nutterb/redcapAPI", ref = "Version2")

@hatemhosny
Copy link
Contributor Author

thanks @wibeasley and @nutterb

I re-installed redcapAPI from github as suggested

using that code:

library(redcapAPI)
rcon <- redcapConnection(uri, token)
mydata <- exportReports(rcon, reportid)

I get this error:

Error in if (meta_data$field_type[meta_data$field_name %in% x] == "checkbox") { : 
  argument is of length zero
In addition: There were 50 or more warnings (use warnings() to see the first 50)

and lots of

Warning messages:
1: In rbind(c("1", " field1"), c(" 2", " field2"), c(" 3",  ... :
  number of columns of result is not a multiple of vector length (arg 1)
2: In rbind(c("1", " field1"), c(" 2", " field2"), c(" 3",  ... :
  number of columns of result is not a multiple of vector length (arg 1)

I am running windows 10, R 3.4.2 and REDCap 7.3.1

@nutterb
Copy link
Contributor

nutterb commented Jan 16, 2018

Running R 3.4.2 and REDCap 8.1.2, I'm not able to replicate the error. Would you be able to share your data dictionary?

@wibeasley
Copy link
Member

@hatemhosny, reopen this dormant issue if you'd like.

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

3 participants