adpc_a <- adpc %>%filter( PARAM =="Plasma Drug X", ARMCD =="ARM A" ) %>%mutate(Patient_ID =sub(".*id-", "", USUBJID)) %>%filter(Patient_ID %in%unique(Patient_ID)[1:10])use_title1 <-"Plot of X Concentration (ug/mL) Over Time by Treatment: \nPK Evaluable Patients"use_subtitle1 <-"Analyte: Plasma X (ug/mL) \nTreatment Group: ARM A"use_footnote1 <-"Program: \nOutput:"plot <-g_ipp(df = adpc_a,xvar ="NFRLT",yvar ="AVAL",xlab ="Norminal Time from First Dose (hr)",ylab ="Concentration (ug/mL)",id_var ="Patient_ID",add_baseline_hline =FALSE,yvar_baseline ="AVAL", # yvar_baseline cannot be NA or ignoretitle = use_title1,subtitle = use_subtitle1,caption = use_footnote1,plotting_choices ="all_in_one")plot
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.
adpc_a <- adpc %>%filter( PARAM =="Plasma Drug X", ARMCD =="ARM A" ) %>%mutate(Patient_ID =sub(".*id-", "", USUBJID)) %>%mutate(avalog =ifelse(AVAL !=0, AVAL, 0.001)) %>%filter(Patient_ID %in%unique(Patient_ID)[1:10])use_title3 <-"Log-scale Plot of X Concentration (ug/mL) Over Time by Treatment: \nPK Evaluable Patients"use_subtitle3 <-"Analyte: Plasma X (ug/mL) \nTreatment Group: ARM A"use_footnote3 <-"Program: \nOutput:"result <-g_ipp(df = adpc_a,xvar ="NFRLT",yvar ="avalog",xlab ="Norminal Time from First Dose (hr)",ylab ="Concentration (ug/mL)",id_var ="Patient_ID",add_baseline_hline =FALSE,yvar_baseline ="AVAL", # yvar_baseline cannot be NA or ignoretitle = use_title3,caption = use_footnote3,subtitle = use_subtitle3,plotting_choices ="all_in_one")plot <- result + ggplot2::scale_y_log10(breaks =c(0.001, 0.01, 0.1, 1, 10), labels =c(0.001, 0.01, 0.1, 1, 10))plot
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.