trans2pix: Convert a transect coordinate file with some waypoints...

View source: R/trans2pix.r

trans2pixR Documentation

Convert a transect coordinate file with some waypoints separated by NA into a matrix with intermediate coordinates replacing NA.

Description

Convert a transect coordinate file with some waypoints separated by NA into a matrix with intermediate coordinates replacing NA.

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 between two waypoints replacing NA values.

Value

A matrix with the intermediate coordinates computed.

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)


pgirmess documentation built on April 8, 2023, 1:12 a.m.

Related to trans2pix in pgirmess...