plot_weather: Lineplot of the weather

Description Usage Arguments Value Note Examples

Description

Generic function to create one grid which includes two or four lineplots. The first two plots show the chosen weather condition during the years from 1950 to 2010 and during 1950, 1980 and 2010. The last two show the chosen weather condition during the years from the earliest to the latest of the chosen years and during the chosen years. If the parameter both is false the first two plots will not be visible.

Usage

1
2
3
4
5
plot_weather(x, ...)

## with extra arguments
plot_weather(x, yr, ...)
plot_weather(x, yr, both = FALSE, ...)

Arguments

x

a column from klimaFR. This data frame will set the weather condition.

...

further arguments passed to or from other methods

yr

a integer between 1950 and 2010 or a numeric array with integers between 1950 and 2010. The chosen years will be used to generate the third and fourth plot.

both

a boolean. This boolean will decide whether you will get both grids or only the grid with the chosen years in yr.

Value

The described grid

Note

Without the packages ggplot2, scales, cowplot and reshape2 this function won't work. If you want to have a better plot (e.g. without overlapping titles), use the zoom (in RStudio). Please keep in mind that the plots might have gaps because of the missing infomation in the data frame.

Examples

1
2
3
4
5
plot_weather(klimaFR$temp_mean)

plot_weather(klimaFR$precip, yr =  c(2000, 1999, 2006))

plot_weather(klimaFR$sun_dur, yr =  c(1965, 1954, 1960), both = FALSE)

buozyte/weatheranalysisFR documentation built on Nov. 4, 2019, 8:16 a.m.