plotAvgTemp | R Documentation |
plotAvgTemp
builds a bar plot of time average temperature and two
line plots with maximum and minimum temperature.
plotAvgTemp(
mydata,
date = "date",
temp = "temp",
avg.time = "1 month",
ylabel = NULL,
title = "",
locale = NULL
)
mydata |
A dataframe containing data to plot. |
date |
The name of the column representing date and time. Data must be of
class |
temp |
Name of the column representing temperature (default = "temp") |
avg.time |
Defines the time period to average to. Currently the only supported period is "1 month" (default). |
ylabel |
The label along the y axis. If missing a default label is plotted. |
title |
Optional plot title |
locale |
Locale to use for day and month names. Default is current locale. Supported locales are listed in stringi::stri_locale_list(). All other labels are in English by default or in Italian if its locale is specified. |
A plot with average, min and max temperature in a given range of time.
plotStabilityClass()
, plotAvgRad()
# Plot average monthly temperature and curves with monthly maximum and minimum
data(stMeteo)
str(stMeteo)
plotAvgTemp(stMeteo)
# Add a custom title
plotAvgTemp(stMeteo, title = "Monthly temperature")
# Override default locale
plotAvgTemp(stMeteo, avg.time = "1 month", locale = "it_IT")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.