VAST
VAST copied to clipboard
Plot_maps function error
Hello! I have tried to run the function below:
plot_maps(plot_set=c(3), TmbData = TmbData, MappingDetails=MapDetails_List[["MappingDetails"]], Report=Report, Sdreport=Opt$SD, PlotDF=MapDetails_List[["PlotDF"]], MapSizeRatio=MapDetails_List[["MapSizeRatio"]], Xlim=MapDetails_List[["Xlim"]], Ylim=MapDetails_List[["Ylim"]], FileName=DateFile, Year_Set= Year_Set, Years2Include=Years2Include, Rotate=MapDetails_List[["Rotate"]], Cex=MapDetails_List[["Cex"]], Legend=MapDetails_List[["Legend"]],zone=MapDetails_List[["Zone"]], mar=c(0,0,2,0), oma=c(3.5,3.5,0,0), cex=1.8, category_names=levels(Data_Geostat[,'species']))
but I got this error: Error in Mat[PlotDF[, "x2i"], , drop = FALSE] : subscript out of bounds
Could you please tell me how to solve this issue? I looked at the function PlotMap_Fn, but I don't know what precisely the "Mat" do?
You're calling mid-level functions directly, which is prone to some user-errors. Can you confirm whether you can run the index exmaple on the wiki including the plot(fit)
call without errors?
And what packageVersion("VAST")
and packageVersion("FishStatsUtils")
are you using?
Thanks Jim! packageVersion("VAST") [1] ‘3.10.1’ packageVersion("FishStatsUtils") [1] ‘2.12.1’
We updated the user_region using a shapefile provided by Aleksei. Then added the correct projargs to plot the western Bering Sea.
plot(fit, settings=settings, plot_set=c(3,11,12,14,15), projargs = "+proj=aea +lat_0=50 +lon_0=180 +lat_1=55 +lat_2=65 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs", n_cells=2000)
I am using the following version:
packageVersion("VAST") [1] ‘2.0.1’ packageVersion("FishStatsUtils") [1] ‘1.0.0’
I can not run plot(fit) as I am using the older version of VAST. The newest version of VAST does not work well on my laptop.