Skip to contents

combines the stats (from individual station evaluation) and site list in a SpatVector using row.names

Usage

stat %at% site

Arguments

stat

data.frame with stats or other variable (containing row.names and other variables)

site

data.frame with site list (containing row.names, lat and lon)

Value

SpatVector (terra package)

Examples


sites<- readRDS(paste0(system.file("extdata",package="eva3dm"),"/sites_AQ_BR.Rds"))
model<- readRDS(paste0(system.file("extdata",package="eva3dm"),"/model.Rds"))
obs  <- readRDS(paste0(system.file("extdata",package="eva3dm"),"/obs.Rds"))

stats <- eva(mo = model, ob = obs, site = 'Americana')
#> Americana has 227 valid observations
stats <- eva(mo = model, ob = obs, site = 'SAndre',table = stats)
#> SAndre has 207 valid observations
stats <- eva(mo = model, ob = obs, site = 'VVIbes',table = stats)
#> VVIbes has only 0 valid observations (lesser than 8 obs)

print(stats)
#>             n      Obs      Sim         r       IOA       FA2     RMSE
#> Americana 227 40.92952 18.18197 0.6492022 0.5934335 0.4229075 32.47269
#> SAndre    207 60.62802 15.66744 0.6246762 0.4813952 0.1449275 59.21330
#> VVIbes      0       NA       NA        NA        NA        NA       NA
#>                  MB       ME   NMB (%)  NME (%)
#> Americana -22.74754 24.10165 -55.57735 58.88575
#> SAndre    -44.96058 45.64932 -74.15808 75.29409
#> VVIbes           NA       NA        NA       NA

geo_stats <- stats %at% sites
#> georeferencing stats at sites 

print(geo_stats)
#>  class       : SpatVector 
#>  geometry    : none 
#>  dimensions  : 0, 0  (geometries, attributes)
#>  extent      : 0, 0, 0, 0  (xmin, xmax, ymin, ymax)
#>  coord. ref. :