Learn R Programming

simulariatools (version 3.1.0)

plotStabilityClass: Plot stability class

Description

Histogram plot of stability classes by season or hour.

Usage

plotStabilityClass(
  mydata,
  date = "date",
  sc = "sc",
  type = "season",
  locale = NULL
)

Value

A ggplot2 plot.

Arguments

mydata

A dataframe containing data to plot.

date

The name of the column representing date and time. Data must be of class POSIXlt or POSIXct (default = "date"). If the timezone is unspecified, it is set to GMT.

sc

The name of the column that represents the stability class (default = "sc").

type

Specify how the data are to be split and plotted. Accepted values are "season" (default) and "hour".

locale

Set the locale for day and month names. The system locale is used by default, but you can specify a different one from the supported ones listed in stringi::stri_locale_list(). All other labels are in English by default or in Italian if its locale is specified.

Details

Numerical values of stability classes are mapped as: 1 = A, 2 = B, ..., 6 = F.

See Also

stabilityClass(), plotAvgRad(), plotAvgTemp()

Examples

Run this code
data("stMeteo")

# Season plot of PGT stability class
plotStabilityClass(stMeteo, date = "date", sc = "pgt", type = "season")

# Hourly plot of PGT stability class
plotStabilityClass(stMeteo, date = "date", sc = "pgt", type = "hour")

# Override default locale
plotStabilityClass(
    stMeteo,
    date = "date",
    sc = "pgt",
    type = "season",
    locale = "it_IT"
)

Run the code above in your browser using DataLab