James-Thorson-NOAA / FishStatsUtils

Shared resources for spatio-temporal models
GNU General Public License v3.0
10 stars 16 forks source link

plot_residuals function returns error with VAST single species example #14

Open dshanisko opened 5 years ago

dshanisko commented 5 years ago

Running the the current single species VAST example the plot_residuals() function returns

Error in matrix(NA, nrow = TmbData$n_x, ncol = nrow(TmbData$t_yz)) : non-numeric matrix extent

Running under Windows 10, R 3.5.2, VAST 3.1.0 and FishStatUtils 2.1.0.

Call to make_data... TmbData = make_data("Version"=Version, "FieldConfig"=FieldConfig, "OverdispersionConfig"=OverdispersionConfig, "RhoConfig"=RhoConfig, "ObsModel"=ObsModel, "c_i"=rep(0,nrow(Data_Geostat)), "b_i"=Data_Geostat[,'Catch_KG'], "a_i"=Data_Geostat[,'AreaSwept_km2'], "v_i"=as.numeric(Data_Geostat[,'Vessel'])-1, "s_i"=Data_Geostat[,'knot_i']-1, "t_i"=Data_Geostat[,'Year'], "spatial_list"=Spatial_List, "Options"=Options )

call to plot_residuals.. plot_residuals(Lat_i=Data_Geostat[,'Lat'], Lon_i=Data_Geostat[,'Lon'], TmbData=TmbData, Report=Report, Q=Q, savedir=DateFile, MappingDetails=MapDetails_List[["MappingDetails"]], 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)

James-Thorson-NOAA commented 5 years ago

what version of VAST and FishStatsUtils? Have you tried updating to the latest release of both packages?

dshanisko commented 5 years ago

Running under Windows 10, R 3.5.2, VAST 3.1.0 and FishStatUtils 2.1.0.

James-Thorson-NOAA commented 5 years ago

Hmm. I'll add this to the list, but probably won't get to it for a while. feel free to email me offline for more details if you'd like to make a pitch for adding this up the queue ;)

dshanisko commented 5 years ago

Will do.