Learn R Programming

Momocs (version 0.2-6)

coo.smooth: Smoothes list and matrices of coordinates.

Description

coo.smooth performs n smoothing iteration on coo.

Usage

coo.smooth(coo, n)

Arguments

coo
A list or a matrix of coordinates.
n
integer. The number of iterations to perform.

Value

  • Returns a matrix of (x; y)coordinates.

Examples

Run this code
data(bot)
coo <- coo.sample(bot@coo[[1]], 100)
coo.plot(coo, points=TRUE, main="Take it not too smooth")
s <- seq(10, 1000, length=10)
cols <- col.summer(10)
for (i in seq(along=s)) {
  coo.draw(coo.smooth(coo, s[i]), col=NA, border=cols[i])
  }

Run the code above in your browser using DataLab