diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 0e8b391..61c6ba2 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ Version: 0.1.6 -Date: 2023-09-18 14:42:04 UTC -SHA: 28daf1f7c21db3a333d9752661e1771ca4d259bb +Date: 2023-09-18 20:13:26 UTC +SHA: d2f1de207dc4ba178aa883cc440cf0d1512289b9 diff --git a/SimSurvey.Rproj b/SimSurvey.Rproj index 5178908..dfc6bb5 100644 --- a/SimSurvey.Rproj +++ b/SimSurvey.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: b80f9c1a-b225-47ef-bc29-3c521134f26c RestoreWorkspace: Default SaveWorkspace: Default diff --git a/tutorial/tutorial.Rmd b/tutorial/tutorial.Rmd index 7f845ee..8ee503e 100644 --- a/tutorial/tutorial.Rmd +++ b/tutorial/tutorial.Rmd @@ -262,10 +262,12 @@ dat <- as_tibble(survey$setdet) %>% ## Make mesh and fit geostatistical model to survey data mesh <- sdmTMB::make_mesh(dat, xy_cols = c("x", "y"), cutoff = 20) -fit <- sdmTMB(N ~ 0 + as.factor(year) + offset, +fit <- sdmTMB(N ~ 0 + as.factor(year), + offset = dat$offset, + mesh = mesh, data = dat, - family = nbinom2(link = "log"), spde = mesh, - include_spatial = TRUE, time = "year") + family = nbinom2(link = "log"), + time = "year") ## Expand grid data for predictions grid_dat <- as_tibble(select(survey$grid_xy, x, y, depth)) %>% distinct() @@ -328,10 +330,12 @@ dat <- as_tibble(survey$setdet) %>% ## Make mesh and fit geostatistical model to survey data mesh <- sdmTMB::make_mesh(dat, xy_cols = c("x", "y"), cutoff = 20) -fit <- sdmTMB(N ~ 0 + as.factor(year) + offset, +fit <- sdmTMB(N ~ 0 + as.factor(year), + offset = dat$offset, + mesh = mesh, data = dat, - family = nbinom2(link = "log"), spde = mesh, - include_spatial = TRUE, time = "year") + family = nbinom2(link = "log"), + time = "year") ## Expand grid data for predictions grid_dat <- as_tibble(select(survey$grid_xy, x, y, depth)) %>% distinct()