Closed Melkiades closed 1 year ago
@JiaLiu0001 , fyi, once we make forward with this issue, we should be able to introduce datetime class
@Melkiades I will start looking into implementing this today. I'll start at adsl
and then work my way down the datasets alphabetically so if you start from the bottom of the list alphabetically we won't overlap (depending on how much work this issue requires) if you want to work on this as well. On the bright side, there are less things we'll have to check for breakage since decoupling scda.2022
from tern
and teal.modules.clinical
!
decoupling scda.2022 from tern and teal.modules.clinical is the best thing happened this year! hahaha
Motivation
These changes need to be thoroughly checked downstream as a Date object in
lubridate
may be different from standardas.Date()
calls, and therefore it could break some things downstream. An eventual hotfix is to cast the date columns to characters or base-date. Still, I argue thatlubridate
is a higher standard both for readability and usability. Checking the code forADEX
, I think there could be a bit more organization and more modular calls to dplyr (i.e. less grouping of mutate) so to understand better how the data is gradually expanded and what are the key parameters. This is clear inADSL
but not in other data-set as ADEX.I think this simplification work could make further modifications of data sets faster and more effective. I used
Hmisc::describe()
andtable(data[, two_cols_I_want_to_compare])
to understand a bit better some columns.This issue is mainly about date formats and simplifications but follows inconsistency problems caused by the hotfix of visit relative days (see teal.osprey#170, thanks @nikolas-burkoff).
Feel free to refine the issue @ayogasekaram @edelarua.
Todo
Change the following datatime variables to use
lubridate
class