CHOP-CGTInformatics / REDCapTidieR

Makes it easy to read REDCap Projects into R
https://chop-cgtinformatics.github.io/REDCapTidieR/
Other
32 stars 8 forks source link

Block Matrix line 48 paper #168

Closed spgarbet closed 7 months ago

spgarbet commented 7 months ago

The existing paper on line 48 states '...only REDCapTidieR restructures the block matrix into an easy to use format ...'

This was true a true statement a year ago, but the package redcapAPI at present supports splitting out the block sparse matrix into separate data.frames with a single call exportBulkRecords.

The paper's description of the block sparse problem is excellent.

A big dividing line between the REDCapTidierR and redcapAPI is that redcapAPI is by design intended to be mostly base R, whereas REDCapTidieR has full tibble support which a lot of users love.

spgarbet commented 7 months ago

One big difference is the redcapAPI export just gives a list of data.frames, there's no relationship information between the forms/instruments.

skadauke commented 7 months ago

@rsh52, I think we need to take a closer look at the exportBulkRecords functionality of redcapAPI and contrast it with the approach we generate data tibbles in the manuscript. I think it might be important to explain better how we use identifier columns to dynamically form a composite primary key depending on the structure/granularity of an instrument, and how that allows joins between related entities (if that is indeed a difference).

spgarbet commented 7 months ago

I just tried both, and the data tibble approach is a lot cleaner and easier to use. The identifier column and dynamically joining is definitely something that redcapAPI does not do. It can't do so easily because of the usage of baseR. I ran some timings and both were similar in export time over several runs.

rsh52 commented 7 months ago

I'll investigate further and apply an update to the paper. Thank you very much for the kind words @spgarbet and bringing this to our attention! We know REDCapTidieR was built on the shoulders of giants and want to be as accurate as possible when paying homage. There are certainly pluses and minuses to the baseR/tidyverse frameworks, and we aimed the package to be best suited to readability for analysts.

spgarbet commented 7 months ago

It's also a fluid situation. Things have changed a lot in redcapAPI in the last year.

rsh52 commented 7 months ago

Was able to test out the new redcapAPI functions, very impressive and a lot of great work since I checked it out a while ago! Working on updating the section appropriately now.

spgarbet commented 7 months ago

Thanks, it's been a major overhaul.