Biogen-Inc / tidyCDISC

Demo the app here: https://bit.ly/tidyCDISC_app
https://biogen-inc.github.io/tidyCDISC/
GNU Affero General Public License v3.0
108 stars 38 forks source link

TG: stop() or validate() ? #206

Closed AARON-CLARK closed 1 year ago

AARON-CLARK commented 1 year ago

Item 2 (latest versions of all packages)

Used study data. Loaded ADSL dataset. Attempted to create “Table3 Accounting of subjects”.

image

Input to asJSON(keep_vec_names=TRUE) is a named vector. In a future version of jsonlite, this option will not be supported, and named vectors will be translated into arrays instead of objects. If you want JSON object output, please use a named list instead. See ?toJSON.

This also happens if you try to generate “Table 5: Demography” and filter by ACTARM.

This appears to be a result of using stop() instead of validate().

Originally posted by @Jeff-Thompson12 in https://github.com/Biogen-Inc/tidyCDISC/issues/202#issuecomment-1460896576

Jeff-Thompson12 commented 1 year ago

It appears what was happening here has to do with rlang_error class objects. They are lists and asJSON() was no longer handling them in the expected way.

AARON-CLARK commented 1 year ago

closed wtih #213