customize.Rmd
library(pmplots) library(dplyr) data <- pmplots_data_obs()
dv_pred(data)
## `geom_smooth()` using formula 'y ~ x'
dv_ipred(data) + labs(x = "Predicted concentration (mg/L)")
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
There are a couple of ways to do this. The easiest is to have the latex2exp package installed and write the TeX right in the label.
dv_pred(data, x = "IPRED//Predicted concentration ($\\mu$g/mL)")
## Loading required namespace: latex2exp
## `geom_smooth()` using formula 'y ~ x'
Otherwise, you can trigger R plotmath by putting !!
at the start of the column label
dv_pred(data, x = "IPRED//!!'Predicted concentration (' * mu * 'g/mL)'")
## `geom_smooth()` using formula 'y ~ x'
dv_pred(data) + labs(subtitle = "Run 1001")
## `geom_smooth()` using formula 'y ~ x'