保留正斜杠并使用 openair 包中的 timePlot 制作上标

Keep a forward slash and make superscripts with timePlot from package openair

如何在 R 中保留正斜杠?

例如,我需要保留斜线并制作 3 上标,

...
ylab = "PM2.5 Concentration [ug/m3]/ Device Humidity [%]",
name.pol = c("PM2.5 Concentration [ug/m3]", "Device Humidity [%]"),
...

我自动得到这个结果,

m前面的斜杠已经去掉了(不是我想要的)。

3是上标(我想要的)

有什么想法吗?

编辑:

            timePlot(allData, 
               pollutant = c("particle_concentration", "humidity"), 
               avg.time = mean,
               lwd = 2,
               lty = 1,
               ylab = "PM2.5 Concentration [ug/m3]/ Device Humidity [%]",
               xlab = siteData$description,
               name.pol = c("PM2.5 Concentration [ug/m3]", "Device Humidity [%]"),
               cols = c("blue", "orange"),
               type = "site",
               group = TRUE)

设置auto.text = FALSE并使用plotmath:

library(openair)
timePlot(mydata, pollutant = "nox",
         ylab = expression(paste("PM2.5 Concentration ", group("[", mu*g/{m^3}, "]"), "/ Device Humidity [%]")),
         auto.text = FALSE)