pfmc-assessments / VASTWestCoast

VAST for the NWFSC West Coast data
Other
5 stars 1 forks source link

spatial_list not found when using example code #18

Closed mkapur closed 4 years ago

mkapur commented 5 years ago

I'm doing some testing to ensure I get comprable results using VAST "on it's own" vs this package, e.g. what was used in the 2019 Sablefish assessment. However, when I run the following (same as example here) I get an error, which occurred both before & after a new install. Strange because I used this code for Widow earlier in the summer. Let me know if overlooking something obvious, thanks!

devtools::install_github("nwfsc-assess/VASTWestCoast")
library(VASTWestCoast)
Sim_Settings <- list(
  "Species" = "WCGBTS_Anoplopoma_fimbria",
  "ObsModelcondition" = c(2, 1),
  "nknots" = 250,
  "strata" = data.frame("STRATA" = "All_areas"),
  "depth" = c("no", "linear", "squared")[1],
  "Passcondition" = TRUE)

downloaddir <- getwd()

test <- VAST_condition(
  conditiondir = downloaddir,
  settings = Sim_Settings, spp = Sim_Settings$Species,
  datadir = downloaddir,
  overdispersion = NULL)
VAST_diagnostics(downloaddir)

And the error:

Using strata 1
convUL: For the UTM conversion, automatically detected zone 10.
convUL: Converting coordinates within the northern hemisphere.
Error in ifelse(is.null(spatial_list), 1, spatial_list$n_g) : 
  argument "spatial_list" is missing, with no default
kellijohnson-NOAA commented 4 years ago

@mkapur I think I responded to this via email rather than here, which was bad on my part. Anyway, I think this was happening because of a mismatch in FishStatsUtils versions. Please let me know if there is anything that I can help with currently.