disProg2sts: Convert disProg object to sts and vice versa

Description Usage Arguments Value See Also Examples

View source: R/sts.R

Description

A small helper function to convert a disProg object to become an object of the S4 class sts and vice versa. In the future the sts should replace the disProg class, but for now this function allows for conversion between the two formats.

Usage

1
2
   disProg2sts(disProgObj, map=NULL)
   sts2disProg(sts)

Arguments

disProgObj

an object of class "disProg"

map

an optional "SpatialPolygons" object

sts

an object of class "sts" to convert

Value

an object of class "sts" or "disProg", respectively.

See Also

sts-class

Examples

1
2
3

Example output

Loading required package: sp
Loading required package: xtable
Loading required package: polyCub
This is surveillance 1.13.1. For overview type 'help(surveillance)'.
-- An object of class sts -- 
freq:		 52 
start:		 2001 1 
dim(observed):	 290 12 

Head of observed:
     chwi frkr lich mahe mitt neuk pank rein span zehl scho trko
[1,]    0    0    0    0    0    0    0    0    0    0    0    0

head of neighbourhood:
     chwi frkr lich mahe mitt neuk pank rein span zehl scho trko
chwi   NA   NA   NA   NA   NA   NA   NA   NA   NA   NA   NA   NA
[1] "disProg"

surveillance documentation built on Oct. 7, 2017, 1:04 a.m.