Skip to contents

Computes the coefficient of determination using the cor() function between simulated and observed data

Usage

compute_R2(
  obs,
  sim,
  na.rm = TRUE,
  method = c("pearson", "kendall", "spearman")
)

Arguments

obs

Observed streamflow vector

sim

Simulated streamflow vector

na.rm

Should missing values be omited ?

method

The method to use in cor() function

Value

R2