Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

quickText

Automatic text formatting for openair


Description

Workhorse function that automatically applies routine text formatting to common expressions and data names used in openair.

Usage

quickText(text, auto.text = TRUE)

Arguments

text

A character vector.

auto.text

A logical option. The default, TRUE, applies quickText to text and returns the result. The alternative, FALSE, returns text unchanged. (A number of openair functions enable/unenable quickText using this option.

Details

quickText is routine formatting lookup table. It screens the supplied character vector text and automatically applies formatting to any recognised character sub-series. The function is used in a number of openair functions and can also be used directly by users to format text components of their own graphs (see below).

Value

The function returns an expression for graphical evaluation.

Author(s)

Karl Ropkins.

Examples

#example 1
##see axis formatting in an openair plot, e.g.:
scatterPlot(mydata, x = "no2", y = "pm10")

#example 2
##using quickText in other plots
plot(mydata$no2, mydata$pm10, xlab = quickText("my no2 label"),
     ylab = quickText("pm10 [ ug.m-3 ]"))

openair

Tools for the Analysis of Air Pollution Data

v2.10-0
GPL (>= 2)
Authors
David Carslaw [aut, cre], Karl Ropkins [aut]
Initial release
2022-06-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.