| graph_TRH | R Documentation |
Use this tool to produce a simple temperature and humidity plot with optional background bands showing target temperature and relative humidity ranges. Optionally, add a function to graph, e.g. 'calcDP', 'calcAH', etc.
graph_TRH(
mydata,
Date = "Date",
Temp = "Temp",
RH = "RH",
facet_by = "Sensor",
LowT = 16,
HighT = 25,
LowRH = 40,
HighRH = 60,
y_func = "none",
...
)
mydata |
A data frame containing date (Date), temperature (Temp), and relative humidity (RH) columns. |
Date |
The name of the column in mydata containing date information ("Date"). |
Temp |
The name of the column in mydata containing temperature data ("Temp"). |
RH |
The name of the column in mydata containing relative humidity data ("RH"). |
facet_by |
Name of categorical column to facet by; defaults to "Sensor". |
LowT |
Numeric lower bound of temperature range (default 16). |
HighT |
Numeric upper bound of temperature range (default 25). |
LowRH |
Numeric lower bound of relative humidity range (default 40). |
HighRH |
Numeric upper bound of relative humidity range (default 60). |
y_func |
Character string specifying a function to apply to temperature and humidity columns (e.g. "calcAH"). Default is "none". |
... |
Additional arguments passed to y_func. |
A ggplot graph of temperature and relative humidity with optional background bands.
# mydata file
filepath <- data_file_path("mydata.xlsx")
mydata <- readxl::read_excel(filepath, sheet = "mydata", n_max = 1000)
# Basic use with background ranges
graph_TRH(mydata)
# Add dew point and customise
graph_TRH(mydata, y_func = "calcDP", LowT = 6, HighT = 28)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.