I have a series of x,y coordinates that represent a movement path of a
tagged animal. I want to regularize the track, but approx interpolates over
the range of x's as opposed to treating the track as an ordered sequence.
I've tried coercing it into a time series, but this only seems to work when
the X's constantly increase. The following dummy track provides a glimpse of
the problem with approx:

x <- c(1,3,5,5,5,4,2,1.5)
y <- c(1,1,1,2,3,3,3,3)
xypair <- cbind(x,y)
xypair
rownames(xypair) <- 1:length(x)
plot(x,y,type='l')
points(xypair)
text(x,y,rownames(xypair),offset=.5,pos=2)
points(approx(xypair,n=30),col=3,pch="*")

Suggestions?

Thanks,
Rob

	[[alternative HTML version deleted]]


