trans2pix {pgirmess}R Documentation

Convert a transect coordinate file with some landmarks into a matrix with intermediate coordinates.

Description

Convert a transect coordinate file with some landmarks and NA values in between into a matrix with intermediate coordinates.

Usage

trans2pix(vect)

Arguments

vect A two column matrix or data.frame

Details

If vect has more than two column the two first column only are read. This function computes the intermediate coordinates of each lines materialised with NA values.

Value

A matrix with the intermediate coordinates computed.

Author(s)

Patrick Giraudoux <pgiraudo@univ-fcomte.fr>

See Also

trans2seg

Examples


x<-c(10,NA, NA, NA,56,NA,NA,100)
y<-c(23,NA, NA, NA,32,NA,NA,150)
cols=c("red","blue","blue","blue","red","blue","blue","red")
plot(x,y,col=cols,pch=19)
plot(trans2pix(cbind(x,y)),col=cols,pch=19)


[Package pgirmess version 1.3.7 Index]