Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit a32736a

Browse files
author
malchowa
committed
update package to correspond to RS v2.0.2
1 parent dab500b commit a32736a

35 files changed

Lines changed: 375 additions & 413 deletions

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Authors@R: c(
99
person("Justin M.J.", "Travis", role = c("aut")),
1010
person("Damaris", "Zurell", role = c("aut"))
1111
)
12-
Date: 2021-01-11
12+
Date: 2021-08-04
1313
URL: https://rangeshifter.github.io/RangeshiftR-tutorials/
1414
Description: RangeShiftR provides individual-based simulations of spatial eco-evolutionary dynamics. It is based on the C++ software RangeShifter, making it flexible and fast. RangeShiftR models the processes of demography, dispersal and evolution in an inter-dependent way, offering substantial complexity in the corresponding modelling choices. It is entirely open-source and aims to facilitate the application of individual-based and mechanistic modelling to eco-evolutionary questions.
1515
License: GPL-3

R/RangeShiftR.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ NULL
5050

5151

5252
.onAttach <- function(libname, pkgname) {
53-
packageStartupMessage("RangeshiftR version 1.0.3 (11.01.2021)\n",
53+
packageStartupMessage("RangeshiftR version 1.0.3 (04.08.2021)\n",
5454
"Copyright (C) 2020-2021 Anne-Kathleen Malchow, Greta Bocedi, Stephen C.F. Palmer, Justin M.J. Travis, Damaris Zurell\n\n",
5555
"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.\n",
5656
"You are welcome to redistribute it and/or modify it under certain conditions;\n",
@@ -67,7 +67,7 @@ NULL
6767
#' @export
6868
RangeShiftR_license <- function ()
6969
{
70-
cat("\nRangeshiftR version 1.0.3 (13.04.2021)\n")
70+
cat("\nRangeshiftR version 1.0.3 (04.08.2021)\n")
7171
cat("Copyright (C) 2020-2021 Anne-Kathleen Malchow, Greta Bocedi, Stephen C.F. Palmer, Justin M.J. Travis, Damaris Zurell\n\n")
7272
cat("This program is free software: you can redistribute it and/or modify\n")
7373
cat("it under the terms of the GNU General Public License as published by\n")

R/class_DemogParams.R

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,16 @@
109109
#'
110110
#' A major difference between transition matrices and this individual-based model is that in the first, the three processes of reproduction, survival and development happen simultaneously while, in the second, they are explicitly modelled in sequence.
111111
#' The sequence of these events and the time of the dispersal phase in relation to them can change the actual dynamics and density-dependencies in both population growth and dispersal. At the beginning of each year, reproduction is always the first
112-
#' process to be modelled. After reproduction there are three choices:
112+
#' process to be modelled. However, there can be multiple reproductive seasons per year (default is one); in this case the year starts with a succession of all reproductive seasons. There are three choices for the scheduling of reproduction, survival, development and dispersal:
113113
#' \itemize{
114-
#' \item \code{SurvSched=0}: Survival and development of all stages (apart from stage 0) occur simultaneously with reproduction; dispersal; survival and development of stage 0; aging; end of the year.
115-
#' \item \code{SurvSched=1}: Dispersal; survival and successive development of all the stages; aging; end of the year.
116-
#' \item \code{SurvSched=2}: Only for species having multiple reproductive seasons in a year: dispersal and then survival and development of all stages happen at the end of every reproductive season (i.e. more than once per year); aging; end of the year.
114+
#' \item \code{SurvSched=0}: For each reproductive season: reproduction; survival and development of all stages (apart from stage 0); dispersal; survival and development of stage 0. Then: aging; end of the year.
115+
#' \item \code{SurvSched=1}: For each reproductive season: reproduction; dispersal; survival and successive development of all stages. Then: aging; end of the year.
116+
#' \item \code{SurvSched=2}: For each reproductive season: reproduction; dispersal. Then: survival and development of all stages; aging; end of the year. This option applies only for species having multiple reproductive seasons in a year, otherwise it is equivalent to \code{SurvSched=1}.
117117
#' }
118-
#' Option 1 gives results that are comparable with the deterministic solution of the matrix. The choice will depend on the biology of the species. If the main mortality happens overwinter, option 2 might be more appropriate.
118+
#' Option \code{SurvSched=0} gives results that are comparable with the deterministic solution of the matrix. The choice will depend on the biology of the species. If the main mortality happens overwinter, option \code{SurvSched=1} might be more appropriate.
119+
#'
120+
#' Note that \code{SurvSched=1} in combination with multiple reproductive seasons (\code{RepSeasons>1}) implies several evaluations of the fecundity and the survival and development probabilities, so that the transition matrix should be set accordingly.
121+
#' If the transition matrix contains the annual survival and development rates, \code{SurvSched=2} is the appropriate option (fecundity, however, is still given per reproductive event).
119122
#'
120123
#' \emph{Density dependence} can act on each of the three demographic phases (i.e. reproduction, survival and development) and is controlled by \code{FecDensDep,DevDensDep,SurvDensDep}.
121124
#' It is implemented as an exponential decay \insertCite{neubert2000}{RangeShiftR}:

R/class_DispersalParams.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ setMethod("plotProbs", "EmigrationParams", function(x, stage = NULL, sex = NULL,
405405
}
406406
}
407407
if (length(leg.txt)>0) {
408-
legend("topright", leg.txt, col = 1:nrow(emig), lwd = 1.5)
408+
legend("topleft", leg.txt, col = 1:nrow(emig), lwd = 1.5)
409409
}
410410
})
411411

R/class_InitialisationParams.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
#' There are three options:
9797
#' \itemize{
9898
#' \item \emph{At} \code{K_or_DensDep}. (\code{InitDens}\eqn{=0})\cr The cell/patch will be saturated at its respective \eqn{K} or \eqn{1/b}.
99-
#' \item \emph{At half} \code{K_or_DensDep}. (\code{InitDens}\eqn{=1})\cr The cell/patch will be saturated at half its \eqn{K} or \eqn{1/b}.
99+
#' \item \emph{At half} \code{K_or_DensDep}. (\code{InitDens}\eqn{=1})\cr The cell/patch will be initialised at half its \eqn{K} or \eqn{1/b}.
100100
#' \item \emph{Set value} \code{IndsHaCell}. (\code{InitDens}\eqn{=2})\cr Set the number of individuals to be seeded in each cell or the density
101101
#' in each patch (in units of individuals per hectare).
102102
#' }

inst/CITATION

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ citEntry(entry = "Article",
77
as.person("Stephen C. F. Palmer"),
88
as.person("Justin M.J. Travis"),
99
as.person("Damaris Zurell")),
10-
url = "https://www.biorxiv.org/content/10.1101/2020.11.17.384545v1",
11-
journal = "bioRxiv",
12-
year = "2020",
13-
doi = "10.1101/2020.11.17.384545",
14-
note = "Publisher: Cold Spring Harbor Laboratory
15-
Section: New Results",
10+
journal = "Ecography",
11+
year = "2021",
12+
doi = "10.1111/ecog.05689",
1613
textVersion = NULL
1714
)
1815

inst/REFERENCES.bib

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
@article{bocedi2020,
22
title = {{RangeShifter} 2.0: {An} extended and enhanced platform for modelling spatial eco-evolutionary dynamics and species' responses to environmental changes.},
3-
copyright = {© 2020, Posted by Cold Spring Harbor Laboratory. This pre-print is available under a Creative Commons License (Attribution-NonCommercial 4.0 International), CC BY-NC 4.0, as described at http://creativecommons.org/licenses/by-nc/4.0/},
43
shorttitle = {{RangeShifter} 2.0},
5-
url = {https://www.biorxiv.org/content/10.1101/2020.11.26.400119v1},
6-
doi = {10.1101/2020.11.26.400119},
4+
doi = {10.1111/ecog.05687},
5+
journal = {Ecography},
76
language = {en},
8-
urldate = {2020-11-28},
9-
journal = {bioRxiv},
107
author = {Bocedi, Greta and Palmer, Stephen C. F. and Malchow, Anne-Kathleen and Zurell, Damaris and Watts, Kevin and Travis, Justin MJ},
11-
month = nov,
12-
year = {2020},
13-
note = {Publisher: Cold Spring Harbor Laboratory
14-
Section: New Results},
15-
pages = {2020.11.26.400119}
8+
year = {2021}
169
}
1710

1811
@article{bocedi2014,

man/Initialise.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/StageStructure.Rd

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cell.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ intptr Cell::getPatch(void)
127127
return pPatch;
128128
}
129129

130-
locn Cell::getLocn(void) { locn q{}; q.x = x; q.y = y; return q; }
130+
locn Cell::getLocn(void) { locn q; q.x = x; q.y = y; return q; }
131131

132132
void Cell::setEnvDev(float d) { envDev = d; }
133133

@@ -169,7 +169,7 @@ smsData = 0;
169169
}
170170

171171
array3x3f Cell::getEffCosts(void) {
172-
array3x3f a{};
172+
array3x3f a;
173173
if (smsData == 0 || smsData->effcosts == 0) { // effective costs have not been calculated
174174
for (int i = 0; i < 3; i++) {
175175
for (int j = 0; j < 3; j++) {
@@ -225,7 +225,7 @@ else return false;
225225
bool DistCell::selected(void) { return initialise; }
226226

227227
locn DistCell::getLocn(void) {
228-
locn loc{}; loc.x = x; loc.y = y; return loc;
228+
locn loc; loc.x = x; loc.y = y; return loc;
229229
}
230230

231231
//---------------------------------------------------------------------------

0 commit comments

Comments
 (0)