| edit_lM | R Documentation |
Function edit_lM() edits existing lefkoMat objects with
external data supplied by the user. The effects are similar to function
supplemental(), though function edit_lM() allows
individuals matrices within lefkoMat objects to be edited after
creation, while supplemental() provides external data that
modifies all matrices within a lefkoMat object.
edit_lM(
mpm,
pop = NULL,
patch = NULL,
year2 = NULL,
stage3 = NULL,
stage2 = NULL,
stage1 = NULL,
age2 = NULL,
eststage3 = NULL,
eststage2 = NULL,
eststage1 = NULL,
estage2 = NULL,
givenrate = NULL,
multiplier = NULL,
type = NULL,
type_t12 = NULL
)
mpm |
The |
pop |
A string vector denoting the populations to be edited. Defaults
to |
patch |
A string vector denoting the patches to be edited. Defaults
to |
year2 |
A string vector denoting the years to be edited. Defaults
to |
stage3 |
The name of the stage in occasion t+1 in the transition
to be replaced. Abbreviations for groups of stages are also usable (see
|
stage2 |
The name of the stage in occasion t in the transition
to be replaced. Abbreviations for groups of stages are also usable (see
|
stage1 |
The name of the stage in occasion t-1 in the transition
to be replaced. Only needed if a historical matrix is to be produced.
Abbreviations for groups of stages are also usable (see |
age2 |
An integer vector of the ages in occasion t to use in transitions to be changed or replaced. Required for all age- and age-by-stage MPMs. |
eststage3 |
The name of the stage to replace |
eststage2 |
The name of the stage to replace |
eststage1 |
The name of the stage to replace |
estage2 |
The age at time t to replace |
givenrate |
A fixed rate or probability to replace for the transition
described by |
multiplier |
A vector of numeric multipliers for fecundity or for proxy
transitions. Defaults to |
type |
A vector denoting the kind of transition between occasions
t and t+1 to be replaced. This should be entered as |
type_t12 |
An optional vector denoting the kind of transition between
occasions t-1 and t. Only necessary if a historical MPM in
deVries format is desired. This should be entered as |
An edited copy of the original MPM is returned, also as a
lefkoMat object.
Entries in stage3, stage2, and stage1 can include
abbreviations for groups of stages. Use rep if all reproductive
stages are to be used, nrep if all mature but non-reproductive stages
are to be used, mat if all mature stages are to be used, immat
if all immature stages are to be used, prop if all propagule stages
are to be used, npr if all non-propagule stages are to be used,
obs if all observable stages are to be used, nobs if all
unobservable stages are to be used, and leave empty or use all if all
stages in stageframe are to be used. Also use groupX to denote all
stages in group X (e.g. group1 will use all stages in the respective
stageframe's group 1).
supplemental()
data(cypdata)
cypraw_v1 <- verticalize3(data = cypdata, noyears = 6, firstyear = 2004,
patchidcol = "patch", individcol = "plantid", blocksize = 4,
sizeacol = "Inf2.04", sizebcol = "Inf.04", sizeccol = "Veg.04",
repstracol = "Inf.04", repstrbcol = "Inf2.04", fecacol = "Pod.04",
age_offset = 3, NAas0 = TRUE, NRasRep = TRUE)
cyp_rl <- rleslie(data = cypraw_v1, start_age = 0, last_age = 6, continue = TRUE,
fecage_min = 3, year = "all", pop = NA, patch = "all", yearcol = "year2",
patchcol = "patchid", indivcol = "individ")
ddd1 <- edit_lM(cyp_rl, age2 = c(0, 1, 2, 3, 4, 5, 6),
givenrate = c(0.25, 0.25, 0.4, 0.4, NA, NA, NA),
multiplier = c(NA, NA, NA, NA, 2000, 2000, 2000),
type = c(1, 1, 1, 1, 3, 3, 3))
ddd1 <- edit_lM(ddd1, age2 = 6, multiplier = 1.5, type = 3, patch = "B",
year2 = "2005")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.