tran.vector {RSurvey} | R Documentation

## Longitudinal and Transverse Velocity Calculations

### Description

Transform velocity components form x and y directions to longitudinal and transverse directions.

### Usage

    tran.vector(vertices, vel.vect, arrow.max)

### Arguments

`vertices` | a matrix with rows corresponding to the transect vertices and columns to x and y values.
`vel.vect` | a data frame with rows corresponding to the raster point records and columns to vector components, see Format section for further details.
`arrow.max` | the maximum transverse velocity arrow symbol length.

### Format

The components associated with `vel.vect` are as follows:

`[,1]` | `x` | numeric | velocity component in the x-direction.
`[,2]` | `y` | numeric | velocity component in the y-direction.
`[,3]` | `z` | numeric | velocity component in the z-direction, positive upward.

### Value

A data frame with rows corresponding to points along a profile. Components associated with each point include:

`[,1]` | `magn` | numeric | the magnitude of the velocity within the principle direction.
`[,2]` | `long` | numeric | longitudinal velocity component, perpendicular to the local x-direction.
`[,3]` | `arrow.x` | numeric | the velocity component in the local x-direction.
`[,4]` | `arrow.y` | numeric | the velocity component in the local z-direction.

### Author(s)

Fisher, J. C.

### Examples

    vert <- matrix(c(0, 0, 10, 10), nrow = 2, ncol = 2,
            byrow = TRUE, dimnames = list(c("1", "2"), c("x", "y")))
    vect <- data.frame(cbind(x = c(1, -2, -3), y = c(-1, 2, -3), z = c(-1, 1, -1)))
    tran.vector(vert, vect, 20)

    ##          magn      long       arrow.x   arrow.y
    ## [1,] 1.732051 -1.414214  2.809440e-16 -4.588315
    ## [2,] 3.000000  2.828427 -1.299754e-15  4.588315
    ## [3,] 4.358899  0.000000 -1.946657e+01 -4.588315

[Package RSurvey version 0.4.5 Index]