Skip to content

Commit

Permalink
fix Barrier-Mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Thorson-NOAA committed Jul 8, 2022
1 parent 3b6582e commit 0fb801d
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 57 deletions.
110 changes: 55 additions & 55 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
Package: VAST
Type: Package
Title: Vector-Autoregressive Spatio-Temporal (VAST) Model
Version: 3.9.0
Date: 2022-03-17
Authors@R:
c(person(given = "James",
family = "Thorson",
role = c("aut", "cre"),
email = "James.Thorson@noaa.gov",
comment = c(ORCID = "0000-0001-7415-1010")),
person(given="Cole",
family="Monnahan",
role="ctb",
email="Cole.Monnahan@noaa.gov")
)
Description: VAST is an R package for conducting spatio-temporal analysis
of data from multiple categories (species, sizes, etc.), and includes both
spatial and spatio-temporal variation in density for each category, with either
factor-analysis or autoregressive correlations among categories, with derived
calculation of abundance indices, center-of-gravity, and area-occupied.
Imports:
deldir,
stats,
devtools,
abind,
MatrixModels,
ThorsonUtilities,
effects,
INLA,
SpatialDeltaGLMM
Depends:
TMB,
R (>= 3.5.0),
Suggests:
testthat,
knitr,
rmarkdown,
FishStatsUtils,
pscl,
tweedie,
mgcv,
lme4
Remotes:
james-thorson-NOAA/FishStatsUtils,
james-thorson/utilities,
nwfsc-assess/geostatistical_delta-GLMM
License: file LICENSE
LazyData: true
Encoding: UTF-8
RoxygenNote: 7.1.1
ByteCompile: true
URL: http://github.com/James-Thorson-NOAA/VAST
BugReports: http://github.com/James-Thorson-NOAA/VAST/issues
VignetteBuilder: knitr
Package: VAST
Type: Package
Title: Vector-Autoregressive Spatio-Temporal (VAST) Model
Version: 3.9.1
Date: 2022-07-07
Authors@R:
c(person(given = "James",
family = "Thorson",
role = c("aut", "cre"),
email = "James.Thorson@noaa.gov",
comment = c(ORCID = "0000-0001-7415-1010")),
person(given="Cole",
family="Monnahan",
role="ctb",
email="Cole.Monnahan@noaa.gov")
)
Description: VAST is an R package for conducting spatio-temporal analysis
of data from multiple categories (species, sizes, etc.), and includes both
spatial and spatio-temporal variation in density for each category, with either
factor-analysis or autoregressive correlations among categories, with derived
calculation of abundance indices, center-of-gravity, and area-occupied.
Imports:
deldir,
stats,
devtools,
abind,
MatrixModels,
ThorsonUtilities,
effects,
INLA,
SpatialDeltaGLMM
Depends:
TMB,
R (>= 3.5.0),
Suggests:
testthat,
knitr,
rmarkdown,
FishStatsUtils,
pscl,
tweedie,
mgcv,
lme4
Remotes:
james-thorson-NOAA/FishStatsUtils,
james-thorson/utilities,
nwfsc-assess/geostatistical_delta-GLMM
License: file LICENSE
LazyData: true
Encoding: UTF-8
RoxygenNote: 7.2.0
ByteCompile: true
URL: http://github.com/James-Thorson-NOAA/VAST
BugReports: http://github.com/James-Thorson-NOAA/VAST/issues
VignetteBuilder: knitr
6 changes: 4 additions & 2 deletions R/make_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
#' \item{\code{Options["Calculate_proportion"]=TRUE}}{Turns on internal calculation and SE for proportion of response within each category (e.g., for calculating proportion-at-age or species turnover)}
#' \item{\code{Options["Calculate_Synchrony"]=TRUE}}{Turns on internal calculation and SE for Loreau metric of synchrony (a.k.a. portfolio effects)}
#' \item{\code{Options["report_additional_variables"]=TRUE}}{Export additional variables to \code{Report} object, to use for diagnostics or additional exploration}
#' \item{\code{Options["range_fraction"]}}{The decorrelation range when passing over land relative to over water; the default value \code{Options["range_fraction"]=0.2} indicates that the range is shorter over land, i.e., that correlations are strongest via water, while changing to \code{Options["range_fraction"]=5} would represent correlations transfer via land more than water}
#' }
#' @param yearbounds_zz matrix with two columns, giving first and last years for defining one or more periods (rows) used to
#' calculate changes in synchrony over time (only used if \code{Options['Calculate_Synchrony']=1})
Expand Down Expand Up @@ -288,7 +289,8 @@ function( b_i,
'zerosum_penalty' = 0,
'EOF_unity_trace' = 0,
'basin_method' = 0,
'lagrange_multiplier' = 50 )
'lagrange_multiplier' = 50,
'range_fraction' = 0.2 )

# Replace defaults for `Options` with provided values (if any)
for( i in seq_along(Options) ){
Expand Down Expand Up @@ -1011,7 +1013,7 @@ function( b_i,
if( "spde_aniso" %in% names(Return) ) Return[['spde_aniso']] = list("n_s"=MeshList$anisotropic_spde$n.spde, "n_tri"=nrow(MeshList$anisotropic_mesh$graph$tv), "Tri_Area"=MeshList$Tri_Area, "E0"=MeshList$E0, "E1"=MeshList$E1, "E2"=MeshList$E2, "TV"=MeshList$TV-1, "G0"=MeshList$anisotropic_spde$param.inla$M0, "G0_inv"=INLA::inla.as.dgTMatrix(solve(MeshList$anisotropic_spde$param.inla$M0)) )
if( "spdeMatricesBarrier" %in% names(Return) ){
Return[['spdeMatricesBarrier']] = MeshList$barrier_list
Return[['Barrier_scaling']] = c(0.2, 1)
Return[['Barrier_scaling']] = c(1, Options2use['range_fraction'])
}

#assign(x="X1_itp", value=X1_itp, envir=.GlobalEnv)
Expand Down
1 change: 1 addition & 0 deletions man/make_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified manual/NEWS.docx
Binary file not shown.
Binary file modified manual/NEWS.pdf
Binary file not shown.

0 comments on commit 0fb801d

Please sign in to comment.