plot_trend: Calculating and Plotting Trends of Pollen Data.

Description Usage Arguments Value See Also Examples

Description

Function to calculate the main seasonal indexes of the pollen season (Start Date, Peak Date, End Date and Pollen Integral). Trends analysis of the parameters over the seasons. Plots showing the distribution of the main seasonal indexes over the years.

Usage

1
2
3
plot_trend(data, interpolation = TRUE, int.method = "lineal",
  export.plot = TRUE, export.format = "pdf", export.result = TRUE,
  method = "percentage", ...)

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.

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

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

export.result

A logical value. If export.result = TRUE, a table is exported with the extension .xlsx, in the directory table_AeRobiology. This table has the information about the slope "beta coefficient of a lineal model using as predictor the year and as dependent variable one of the main pollen season indexes". The information is referred to the main pollen season indexes: Start Date, Peak Date, End Date and Pollen Integral.

method

A character string specifying the method applied to calculate the pollen season and the main seasonal parameters. The implemented methods that can be used are: "percentage", "logistic", "moving", "clinical" or "grains". By default, method = "percentage" (perc = 95%). A more detailed information about the different methods for defining the pollen season may be consulted in the function calculate_ps.

...

Additional arguments for the function calculate_ps are also accepted.

Value

This function returns several plots in the directory plot_AeRobiology/trend_plots with the extension .pdf or .png.Also produces an object of the class data.frame and export a table with the extension .xlsx, in the directory table_AeRobiology.
These tables have the information about the slope (beta coefficient of a lineal model using as predictor the year and as dependent variable one of the main pollen season indexes). The information is referred to the main pollen season indexes: Start Date, Peak Date, End Date and Pollen Integral.

See Also

calculate_ps; analyse_trend

Examples

1
2
 data("munich_pollen")
 plot_trend(munich_pollen, interpolation = FALSE, export.plot = FALSE, export.result = TRUE)

Example output

[1] "2010 Alnus"
[1] "2011 Alnus"
[1] "2012 Alnus"
[1] "2013 Alnus"
[1] "2014 Alnus"
[1] "2015 Alnus"
[1] "2010 Betula"
[1] "2011 Betula"
[1] "2012 Betula"
[1] "2013 Betula"
[1] "2014 Betula"
[1] "2015 Betula"
[1] "2010 Taxus"
[1] "2011 Taxus"
[1] "2012 Taxus"
[1] "2013 Taxus"
[1] "2014 Taxus"
[1] "2015 Taxus"
[1] "2010 Fraxinus"
[1] "2011 Fraxinus"
[1] "2012 Fraxinus"
[1] "2013 Fraxinus"
[1] "2014 Fraxinus"
[1] "2015 Fraxinus"
[1] "2010 Poaceae"
[1] "2011 Poaceae"
[1] "2012 Poaceae"
[1] "2013 Poaceae"
[1] "2014 Poaceae"
[1] "2015 Poaceae"
[1] "2010 Quercus"
[1] "2011 Quercus"
[1] "2012 Quercus"
[1] "2013 Quercus"
[1] "2014 Quercus"
[1] "2015 Quercus"
[1] "2010 Ulmus"
[1] "2011 Ulmus"
[1] "2012 Ulmus"
[1] "2013 Ulmus"
[1] "2014 Ulmus"
[1] "2015 Ulmus"
[1] "2010 Urtica"
[1] "2011 Urtica"
[1] "2012 Urtica"
[1] "2013 Urtica"
[1] "2014 Urtica"
[1] "2015 Urtica"
       type variable          coef          p
1     Alnus    st.jd    3.14285714 0.28493670
2     Alnus    pk.jd   -2.08571429 0.32537225
3     Alnus    en.jd    3.20000000 0.72812495
4     Alnus    sm.ps -129.00000000 0.66744153
5    Betula    st.jd    0.20000000 0.92729638
6    Betula    pk.jd   -0.65714286 0.77017996
7    Betula    en.jd   -0.25714286 0.84993150
8    Betula    sm.ps  470.80000000 0.27568660
9     Taxus    st.jd   -1.74285714 0.46182690
10    Taxus    pk.jd    1.17142857 0.71455540
11    Taxus    en.jd   -1.82857143 0.25902561
12    Taxus    sm.ps 1099.44285714 0.20412709
13 Fraxinus    st.jd   -1.08571429 0.68487770
14 Fraxinus    pk.jd    1.40000000 0.48872434
15 Fraxinus    en.jd   -0.65714286 0.77457120
16 Fraxinus    sm.ps -832.41428571 0.22287693
17  Poaceae    st.jd    0.08571429 0.96505673
18  Poaceae    pk.jd    0.97142857 0.68250129
19  Poaceae    en.jd   -2.68571429 0.44328826
20  Poaceae    sm.ps  348.37142857 0.04915392
21  Quercus    st.jd    1.02857143 0.66446190
22  Quercus    pk.jd    0.97142857 0.57817359
23  Quercus    en.jd   -1.71428571 0.15201569
24  Quercus    sm.ps   28.58571429 0.84628705
25    Ulmus    st.jd   -2.08571429 0.48939041
26    Ulmus    pk.jd   -0.17142857 0.95532128
27    Ulmus    en.jd   -0.37142857 0.89454263
28    Ulmus    sm.ps  -95.14285714 0.21475770
29   Urtica    st.jd   -1.14285714 0.29520131
30   Urtica    pk.jd    1.37142857 0.66138116
31   Urtica    en.jd   -1.82857143 0.21291035
32   Urtica    sm.ps   67.88571429 0.84948029

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