load-Individuals-class: Wrapper function loadIndividuals

Description Usage Arguments Value Examples

Description

Wrapper function to create an Individuals object using SpatialPoints and dataframe.

The SpatialPoints object and the data.frame have to contain the same number of coordinates and rows.

Usage

1
loadIndividuals(objectL, sp, data, mintime, maxtime)

Arguments

objectL

a Landscape object

sp

a SpatialPoint object (individuals coordinates)

data

a data.frame containing individuals attributes. Rows numbers as individuals ID, columns names as dob (date of birth) | life_duration | toxic_threshold

mintime

Start simulation time

maxtime

End simulation time

Value

an Individuals-class object

Examples

1
2
3
4
5
6
7
8
9
 
## Not run: 
# simulate individuals coordinates (SpatialPoints object):
coordinates <- spsample(getSPReceptors(land),n=2)
df <- data.frame("dob"=c(1,8),"life_duration"=c(20,20),
           "toxic_threshold"=c(15,15),row.names = c(1,2))
ind <- loadIndividuals(objetL=land,sp=coordinates,data=df,mintime=1,maxtime=60)

## End(Not run)

SEHmodel documentation built on Sept. 12, 2016, 6:34 a.m.