as.owin {spatstat}R Documentation

Convert Data To Class owin

Description

Converts data specifying an observation window in any of several formats, into an object of class "owin".

Usage

 as.owin(W)

Arguments

W Data specifying an observation window, in any of several formats described under Details below.

Details

The class "owin" is a way of specifying the observation window for a point pattern. See owin.object for an overview.

This function converts data in any of several formats into an object of class "owin" for use by the spatstat package. The argument W may be

Value

An object of class "owin" (see owin.object) specifying an observation window.

Author(s)

Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf

See Also

owin.object, owin

Examples

 w <- as.owin(c(0,1,0,1))
 w <- as.owin(list(xrange=c(0,5),yrange=c(0,10)))
 # point pattern
 data(demopat)
 w <- as.owin(demopat)
 # image
 Z <- as.im(function(x,y) { x + 3}, unit.square())
 w <- as.owin(Z)

 # Venables & Ripley 'spatial' package
 require(spatial)
 towns <- ppinit("towns.dat")
 w <- as.owin(towns)
 detach(package:spatial)

[Package spatstat version 1.6-5 Index]