Closed MayaGans closed 2 years ago
OKAY FIXED IT!
Looks like supplying the columns in the mapping is only step 1 and you also need to add it to your meta
(in the default below it looks like severity
and serious
are not included and without having them in the meta they have nothing to map to? Yay!
library(safetyData)
library(purrr)
sdtm <- list(
dm=safetyData::sdtm_dm,
aes=safetyData::sdtm_ae,
labs=safetyData::sdtm_lb
)
custom_meta <- read.csv("https://raw.githubusercontent.com/SafetyGraphics/safetyCharts/dev/data-raw/meta_aes.csv") %>%
dplyr::filter(text_key == "serious_col" | text_key == "severity_col") %>%
dplyr::bind_rows(safetyGraphics::meta)
safetyGraphics::safetyGraphicsApp(
mapping = list(aes = list(
id_col = 'USUBJID',
seq_col = 'AESEQ',
stdy_col = 'AESTDY',
endy_col = 'AEENDY',
term_col = 'AEDECOD',
bodsys_col = 'AEBODSYS',
severity_col = 'AESEV', # ???
serious_col = 'AESER' # ???
)),
meta = custom_meta,
domainData=sdtm
)
Hi! Looking at safetyCharts for aeTimelines in
data_raw
it looks like I can leverageseverity_col
andserious_col
in my mapping in order to plot the colors and highlighting but running the code below it looks like these two yaml specs are just ignored [I can see AETimelines but it's all blue, and no highlighting]Do I need to call the
init_AETimelines
function before runningsafetyGraphicsApp
? My mental model was that because the chart requires theinit
in it's yaml startup I wouldn't need to do that?Any help appreciated!