Creates the lines for a 'star diagram'

Share:

Description

Creates the lines for a 'star diagram'

Usage

1
star.diagram(swdf1, swdf2, alloc)

Arguments

swdf1

- first Spatial* or Spatial*DataFrame objects

swdf2

- second Spatial* or Spatial*DataFrame objects (if omitted, defaults to the same value as swdf1)

alloc

- a list saying which coordinate in swdf2 is allocated to each point in swdf1 (if ommitted, looks for allocation column in swdf1)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(meuse)
coordinates(meuse) <- ~x+y
allocations.list <- allocate(meuse,p=5)
star.lines <- star.diagram(meuse,alloc=allocations.list)
plot(star.lines)

# Acquire allocations from swdf1
require(GISTools)
set.seed(461976) # Reproducibility
data(georgia)
georgia3 <- allocations(georgia2,p=8)
plot(georgia3,border='grey')
plot(star.diagram(georgia3),col='darkblue',lwd=2,add=TRUE)