plot_extreme: plot_extreme

Description Usage Arguments Value Examples

Description

Graphs a line plot of a row with the highest metric in a matrix, produced by daily_response function.

Usage

1
2
plot_extreme(result_daily_response, title = TRUE, ylimits = NULL,
  reference_window = "start")

Arguments

result_daily_response

a list with three objects as produced by daily_response function

title

logical, if set to FALSE, no plot title is displayed

ylimits

limit of the y axes. It should be given as ylimits = c(0,1)

reference_window

character string, the reference_window argument describes, how each calculation is referred. There are three different options: 'start' (default), 'end' and 'middle'. If the reference_window argument is set to 'start', then each calculation is related to the starting day of window. If the reference_window argument is set to 'middle', each calculation is related to the middle day of window calculation. If the reference_window argument is set to 'end', then each calculation is related to the ending day of window calculation. For example, if we consider correlations with window from DOY 15 to DOY 35. If reference window is set to ‘start’, then this calculation will be related to the DOY 15. If the reference window is set to ‘end’, then this calculation will be related to the DOY 35. If the reference_window is set to 'middle', then this calculation is related to DOY 25.

Value

A ggplot2 object containing the plot display

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
data(LJ_daily_temperatures)
data(example_proxies_1)
Example1 <- daily_response(response = example_proxies_1,
env_data = LJ_daily_temperatures, method = "lm", metric = "r.squared",
fixed_width = 90, previous_year = TRUE, row_names_subset = TRUE)
plot_extreme(Example1)

Example2 <- daily_response(response = example_proxies_1,
env_data = LJ_daily_temperatures, method = "brnn",
metric = "adj.r.squared", lower_limit = 50, upper_limit = 55, neurons = 1,
row_names_subset = TRUE, previous_year = TRUE)
plot_extreme(Example2)

# Example with negative correlations
data(data_TRW_1)
LJ_daily_temperatures_subset = LJ_daily_temperatures[-c(53:55), ]
Example3 <- daily_response(response = data_TRW_1,
env_data = LJ_daily_temperatures_subset, method = "lm", metric = "adj.r.squared",
lower_limit = 35, upper_limit = 40, previous_year = TRUE, row_names_subset = TRUE)
plot_extreme(Example3)

Example4 <- daily_response(response = example_proxies_1,
env_data = LJ_daily_temperatures, method = "lm",
metric = "r.squared", lower_limit = 30, upper_limit = 120, neurons = 1,
row_names_subset = TRUE, previous_year = TRUE)
plot_extreme(Example4)

## End(Not run)

jernejjevsenak/dendroTools2 documentation built on May 24, 2019, 7:14 a.m.