Running examples in ‘surveyvoi-Ex.R’ failed
The error most likely occurred in:

> ### Name: approx_evdsi
> ### Title: Approximate expected value of the decision given survey
> ###   information
> ### Aliases: approx_evdsi
> 
> ### ** Examples
> 
> # set seeds for reproducibility
> set.seed(123)
> 
> # load example site data
> data(sim_sites)
> print(sim_sites)
Simple feature collection with 6 features and 13 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: 0.10513 ymin: 0.04556193 xmax: 0.9764926 ymax: 0.8637977
CRS:           NA
  survey_cost management_cost f1  f2 f3 n1 n2 n3          e1         e2    p1
1          14             102  1 1.0  1  3  3  3  1.00279354 -0.8482403 1.000
2          25              90  0 0.0  0  0  0  0 -1.43840344  1.2724931 0.000
3          25             165  1 0.6  0  5  5  5  1.25316284  0.8166301 1.000
4          17             104  0 0.0  0  0  0  0 -0.48427663 -0.2921152 0.022
5          18             100  0 0.0  0  0  0  0  0.01353284  0.3797104 0.318
6          15              94  0 0.0  0  0  0  0 -0.34680915 -1.3284781 0.474
     p2    p3                     geometry
1 0.999 0.789  POINT (0.1589075 0.8637977)
2 0.000 0.112  POINT (0.9764926 0.7485368)
3 0.419 0.012  POINT (0.8362375 0.2282762)
4 0.502 0.834     POINT (0.10513 0.179855)
5 0.130 0.225 POINT (0.5985786 0.04556193)
6 0.997 0.991  POINT (0.1504241 0.6821156)
> 
> # load example feature data
> data(sim_features)
> print(sim_features)
  name survey survey_sensitivity survey_specificity model_sensitivity
1   f1   TRUE          0.9542052          0.8863798         0.7179855
2   f2   TRUE          0.9739431          0.8748537         0.7045562
3   f3   TRUE          0.9560170          0.8228276         0.7682116
  model_specificity target
1         0.8110524      1
2         0.8600667      1
3         0.8868538      1
> 
> # set total budget for managing sites for conservation
>  # (i.e. 50% of the cost of managing all sites)
> total_budget <- sum(sim_sites$management_cost) * 0.5
> 
> # create a survey scheme that samples the first two sites that
> # are missing data
> sim_sites$survey_site <- FALSE
> sim_sites$survey_site[which(sim_sites$n1 < 0.5)[1:2]] <- TRUE
> 
> # calculate expected value of management decision given the survey
> # information using approximation method
> approx_ev_survey <- approx_evdsi(
+   sim_sites, sim_features,
+   c("f1", "f2", "f3"), c("n1", "n2", "n3"), c("p1", "p2", "p3"),
+   "management_cost", "survey_site",
+   "survey_cost", "survey", "survey_sensitivity", "survey_specificity",
+   "model_sensitivity", "model_specificity",
+   "target", total_budget)
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/data/gannet/ripley/R/test-dev/rlang/libs/rlang.so':
  /data/gannet/ripley/R/test-dev/rlang/libs/rlang.so: undefined symbol: PRVALUE
Calls: approx_evdsi ... namespaceImport -> loadNamespace -> library.dynam -> dyn.load
Execution halted