plot_summary {AeRobiology}R Documentation

Plotting Several Pollen Seasons.

Description

Function to plot the pollen data during several seasons. Also plots the averaged pollen season 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

plot_summary(data, pollen, mave = 1, normalized = FALSE,
  interpolation = TRUE, int.method = "lineal", export.plot = FALSE,
  export.format = "pdf", 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".

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...

Details

This function allows to summarize the pollen season by a simple plot. Even though the package was originally designed to treat aeropalynological data, it can be used to study many other atmospheric components (e.g., bacteria in the air, fungi, insects ...) (Buters et al., 2018; Oteros et al., 2019).

Value

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

References

Buters, J. T. M., Antunes, C., Galveias, A., Bergmann, K. C., Thibaudon, M., Galan, C. & Oteros, J. (2018). Pollen and spore monitoring in the world. Clinical and translational allergy, 8(1), 9.

Oteros, J., Bartusel, E., Alessandrini, F., Nunez, A., Moreno, D. A., Behrendt, H., ... & Buters, J. (2019). Artemisia pollen is the main vector for airborne endotoxin. Journal of Allergy and Clinical Immunology.

See Also

calculate_ps; plot_normsummary

Examples

 data("munich_pollen")
 plot_summary(munich_pollen, pollen = "Betula", export.plot = FALSE, interpolation = FALSE)

[Package AeRobiology version 2.0.1 Index]