Skip to contents

results of 'd01 in d02' style syntax

Usage

x %IN% y

Arguments

x

data.frame

y

data.frame or character string

Note

a message is always displayed to keep easy to track and debug issues (with the results and the evaluation process).

can be used to crop rast objects, such as arguments of sat() function

Examples

times <- seq(as.POSIXct('2024-01-01',tz = 'UTC'),
             as.POSIXct('2024-01-02',tz = 'UTC'),
             by = 'hour')
randon_stuff <- rnorm(25,10)

observation <- data.frame(date   = times,
                          site_1 = randon_stuff,
                          site_3 = randon_stuff,
                          site_4 = randon_stuff,
                          site_5 = randon_stuff,
                          site_6 = randon_stuff,
                          site_7 = randon_stuff)

model_d01 <- data.frame(date  = times,
                        site_1=randon_stuff+1,
                        site_2=randon_stuff+2,
                        site_3=randon_stuff+3,
                        site_4=randon_stuff+4)

model_d02 <- data.frame(date  = times,
                        site_1=randon_stuff-1,
                        site_3=randon_stuff-3)

# multiline
model_d01_in_d02 <- model_d01 %IN% model_d02
#> using model_d01 in model_d02 
eva(mo = model_d01_in_d02, ob = observation, rname = 'd01 in d02')
#> combining all sites...
#> site_1  site_3  ...
#> ALL has 50 valid observations
#>             n      Obs      Sim         r       IOA FA2     RMSE MB ME  NMB (%)
#> d01 in d02 50 9.789513 11.78951 0.7278543 0.5573628   1 2.236068  2  2 20.43003
#>             NME (%)
#> d01 in d02 20.43003

# or single line
eva(mo = model_d01 %IN% model_d02, ob = observation, rname = 'd01 in d02')
#> using model_d01 in model_d02 
#> combining all sites...
#> site_1  site_3  ...
#> ALL has 50 valid observations
#>             n      Obs      Sim         r       IOA FA2     RMSE MB ME  NMB (%)
#> d01 in d02 50 9.789513 11.78951 0.7278543 0.5573628   1 2.236068  2  2 20.43003
#>             NME (%)
#> d01 in d02 20.43003
# or
eva(mo = model_d01, ob = observation %IN% model_d02, rname = 'd01 in d02')
#> using observation in model_d02 
#> combining all sites...
#> site_1  site_3  ...
#> ALL has 50 valid observations
#>             n      Obs      Sim         r       IOA FA2     RMSE MB ME  NMB (%)
#> d01 in d02 50 9.789513 11.78951 0.7278543 0.5573628   1 2.236068  2  2 20.43003
#>             NME (%)
#> d01 in d02 20.43003