Learn R Programming

briskaR (version 0.1.2)

simulateIndividuals: Wrapper function SimulateIndividuals

Description

This function simulates individuals as an Individuals object.

Will simulate n individuals in receptors fields of a Landscape.

Usage

simulateIndividuals(objectL, n = 200, mintime = 1, maxtime, dob,
  life_duration, toxic_threshold)

Arguments

objectL

A Landscape object

n

Number of individuals to simulate

mintime

Start simulation time

maxtime

End simulation time

dob

A vector for the Date Of Birth of each individual between mintime and maxtime

life_duration

A vector for the life duration of each individual

toxic_threshold

A vector for the internal toxic threshold value leading to death for each individual

Value

A S4 Individuals-class object

Details

The Individuals object output includes for each individual the coordinates, the date of birth, the life duration, the toxic threshold and the internal toxic concentration.

See Also

loadIndividuals

Examples

Run this code
# NOT RUN {
data(maize_65)
nb_ind=100 ; time_min=1 ; time_max=61
birth_dates=sample(time_min:time_max, size=nb_ind, replace=TRUE)
life_expectancies=rep(20, nb_ind)
toxic_gap=rep(15, nb_ind)
## generate exposed individuals
ind=simulateIndividuals(maize.landscape, n=nb_ind, mintime=time_min,
                        maxtime=time_max, dob=birth_dates,
                        life_duration=life_expectancies, toxic_threshold=toxic_gap)
plot(maize.landscape,ind)
# }

Run the code above in your browser using DataLab