pfmc-assessments / geostatistical_delta-GLMM

Tool for geostatistical analysis of survey data, for use when estimating an index of abundance
20 stars 17 forks source link

Prepare_Extrapolation_Data_Fn function has disappeared #48

Closed hmorzaria closed 6 years ago

hmorzaria commented 6 years ago

My code used

Extrapolation_List <- SpatialDeltaGLMM::Prepare_Extrapolation_Data_Fn(Region=Region, strata.limits=strata.limits, observations_LL=Data_Geostat[,c('Lat','Lon')], maximum_distance_from_sample = maximum_distance_from_sample)

This worked 2 weeks ago, now I get ERROR : 'Prepare_Extrapolation_Data_Fn' is not an exported object from 'namespace:FishStatsUtils'

The index for SpatialDeltaGLMM now shows the function Prepare_WCGBTS_Extrapolation_Data_Fn.

Do I just substitute directly Prepare_Extrapolation_Data_Fn for this new function?

James-Thorson commented 6 years ago

I apologize, I refactored the code base, and thought that I had done so in a way that was fully backwards compatible. However, it clearly was not fully backwards compatible.

Please instead use:

FishStatsUtils::make_extrapolation_info(Region=Region, strata.limits=strata.limits, observations_LL=Data_Geostat[,c('Lat','Lon')], maximum_distance_from_sample = maximum_distance_from_sample)

and feel free to report back on this thread if you run into other issues. There's a few name changes in basic functions (to meet ROpenSci naming conventions) and feel free to look at the Rmarkdown examples for the new names.

hmorzaria commented 6 years ago

Rmarkdown example SpatialDeltaGLMM_example.Rmd still uses Prepare_Extrapolation_Data_Fn and Spatial_Information_Fn; are there other new examples?

I also encountered the same issue with Spatial_Information_Fn (FishStatsUtils::make_spatial_info)

James-Thorson commented 6 years ago

I think I understand now -- you're using SpatialDeltaGLMM, which is now deprecated. Are you willing to email arnaud and me for help to switch over to VAST? If not I can help you install an older version of SpatialDeltaGLMM from before the recent code refactoring, which will always be one form of backwards compatibility

On Thu, Oct 18, 2018, 4:18 PM Hem Nalini Morzaria-Luna < notifications@github.com> wrote:

Rmarkdown example SpatialDeltaGLMM_example.Rmd still uses Prepare_Extrapolation_Data_Fn and Spatial_Information_Fn; are there other new examples?

I also encountered the same issue with Spatial_Information_Fn (FishStatsUtils::make_spatial_info)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/nwfsc-assess/geostatistical_delta-GLMM/issues/48#issuecomment-431195418, or mute the thread https://github.com/notifications/unsubscribe-auth/AHnqTXxvZPQZ-NlJcIveVGV80xhoTGDqks5umQxPgaJpZM4XvR8g .

hmorzaria commented 6 years ago

Thanks, in general, I do want to switch over to VAST. But for this project, I had completed all the models, and I just need go back and rerun two models again; for this reason, I would like to just install the older version of SpatialDeltaGLMM rather than redo all my code.

James-Thorson commented 6 years ago

OK, you can scroll through the list of commits here: https://github.com/nwfsc-assess/geostatistical_delta-GLMM/commits/master

I think you can install everything you need using:

devtools::install_github( "nwfsc-assess/geostatistical_delta-GLMM", ref="bff70484fb84ccafe72c4953679eafa0bfebd8d4" )

however, I haven't double checked.

On Fri, Oct 19, 2018 at 2:05 PM Hem Nalini Morzaria-Luna < notifications@github.com> wrote:

Thanks, in general, I do want to switch over to VAST. But for this project, I had completed all the models, and I just need go back and rerun two models again; for this reason, I would like to just install the older version of SpatialDeltaGLMM rather than redo all my code.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/nwfsc-assess/geostatistical_delta-GLMM/issues/48#issuecomment-431498659, or mute the thread https://github.com/notifications/unsubscribe-auth/AHnqTeVzCOQWHjefuSAaY0LJBLOM33ANks5umj6EgaJpZM4XvR8g .