nsd | R Documentation |

Given a set of locations defining a trajectory, this function computes the net squared displacement of the trajectory, that is the squared distances between each location and the first location of the trajectory

nsd(x, y, geo = FALSE)

`x` |
A vector of x (or longitude) coordinates corresponding to a single trajectory. |

`y` |
A vector of y (or latitude) coordinates corresponding to a single trajectory. |

`geo` |
A logical value indicating whether the locations are defined by geographic coordinates (pairs of longitude/latitude values). Default: FALSE. |

A vector of the same length as x and y corresponding to the net squared distances between each location and the first location of the trajectory.

Simon Garnier, garnier@njit.edu

`linear_dist`

x <- rnorm(25) y <- rnorm(25, sd = 3) nsd(x, y)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.