plot_normsummary: Plotting the Amplitude of Several Pollen Seasons.

Description Usage Arguments Value See Also Examples

Description

Function to plot the pollen data amplitude during several seasons: daily average pollen concentration over the study period, maximum pollen concentration of each day over the study period and minimum pollen concentration of each day value over the study period. It is possible to plot the relative abundance per day and smoothing the pollen season by calculating a moving average.

Usage

1
2
3
4
plot_normsummary(data, pollen, mave = 1, normalized = FALSE,
  interpolation = TRUE, int.method = "lineal", export.plot = FALSE,
  export.format = "pdf", color.plot = "orange2",
  axisname = "Pollen grains / m3", ...)

Arguments

data

A data.frame object. This data.frame should include a first column in format Date and the rest of columns in format numeric belonging to each pollen type by column.

pollen

A character string with the name of the particle to show. This character must match with the name of a column in the input database. This is a mandatory argument.

mave

An integer value specifying the order of the moving average applied to the data. By default, mave = 1.

normalized

A logical value specifying if the visualization shows real pollen data (normalized = FALSE) or the percentage of every day over the whole pollen season (normalized = TRUE). By default, normalized = FALSE.

interpolation

A logical value specifying if the visualization shows the gaps in the inputs data (interpolation = FALSE) or if an interpolation method is used for filling the gaps (interpolation = TRUE). By default, interpolation = TRUE.

int.method

A character string with the name of the interpolation method to be used. The implemented methods that may be used are: "lineal", "movingmean", "tseries" or "spline". By default, int.method = "lineal".

export.plot

A logical value specifying if a plot will be exported or not. If FALSE graphical results will only be displayed in the active graphics window. If TRUE graphical results will be displayed in the active graphics window and also one pdf/png file will be saved within the plot_AeRobiology directory automatically created in the working directory. By default, export.plot = FALSE.

export.format

A character string specifying the format selected to save the plot. The implemented formats that may be used are: "pdf" or "png". By default, export.format = "pdf".

color.plot

A character string. The argument defines the color to fill the plot. Will be "orange2" by default.

axisname

A character string specifying the title of the y axis. By default, axisname = "Pollen grains / m3".

...

Other additional arguments may be used to customize the exportation of the plots using "pdf" or "png" files and therefore arguments from functions pdf and png may be implemented. For example, for pdf files the user may custom the arguments: width, height, family, title, fonts, paper, bg, fg, pointsize...; and for png files the user may custom the arguments: width, height, units, pointsize, bg, res...

Value

This function returns plot of class ggplot2. User are able to customize the output as a ggplot2 object.

See Also

calculate_ps; plot_summary

Examples

1
2
data("munich_pollen")
plot_normsummary(munich_pollen, pollen = "Betula", interpolation = FALSE, export.plot = FALSE)

AeRobiology documentation built on June 3, 2019, 9:03 a.m.