Learn R Programming

htdp (version 0.1.4)

displace: Estimate horizontal displacement and velocity between two dates

Description

Returns an R data.frame containing the crustal displacement in meters and velocity in mm/yr at a specified location from time t1 to time t2. The estimated displacement equals the velocity at this location multiplied by the time difference (t2 - t1) plus all coseismic and postseismic motion that has occurred between these two times.

Usage

displace(xy, t0, t1, iopt)

Arguments

xy
A matrix of longitude and latitude coordinates in decimal degrees
t0
The starting date
t1
The ending date
iopt
The key identifying the reference frame for the input values. See iopt for a list of supported values.

Value

A data.frame with 6 columns:

See Also

iopt

Examples

Run this code
beta <- matrix(data=c(-121.7722, 36.6698), nrow=1)
t0 <- as.Date("1989-10-16")
t1 <- as.Date("1989-10-18")
displace(beta, t0, t1, 1)

Run the code above in your browser using DataLab