From 7637f45fe1d9f2d18d3cfdd7362f000ce3c5edb6 Mon Sep 17 00:00:00 2001 From: Robin Lovelace Date: Mon, 30 Aug 2021 23:35:33 +0100 Subject: [PATCH] Improve docs for sequential_dist(), see #32 --- R/slopes.R | 8 +++++++- man/elevation_extract.Rd | 8 +++++++- man/sequential_dist.Rd | 8 +++++++- man/slope_matrix.Rd | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/R/slopes.R b/R/slopes.R index d13f5da..95e4d1c 100644 --- a/R/slopes.R +++ b/R/slopes.R @@ -69,7 +69,13 @@ slope_distance_weighted = function(d, elevations) { #' @param elevations Elevations in same units as x (assumed to be metres). #' Default value: `m[, 3]`, meaning the 'z' coordinate in a matrix of #' coordinates. -#' @param m Matrix containing coordinates and elevations +#' @param m Matrix containing coordinates and elevations. +#' The matrix should have three columns: x, y, and z. Typically +#' these correspond to location in the West-East, South-North, and vertical +#' elevation axes respectively. +#' In data with geographic coordinates, Z values are assumed to be in +#' metres. In data with projected coordinates, Z values are assumed to have +#' the same units as the X and Y coordinates. #' @inheritParams slope_vector #' @inheritParams sequential_dist #' @return A vector of slope gradients associated with each linear element diff --git a/man/elevation_extract.Rd b/man/elevation_extract.Rd index 87634d3..b847107 100644 --- a/man/elevation_extract.Rd +++ b/man/elevation_extract.Rd @@ -12,7 +12,13 @@ elevation_extract( ) } \arguments{ -\item{m}{Matrix containing coordinates and elevations} +\item{m}{Matrix containing coordinates and elevations. +The matrix should have three columns: x, y, and z. Typically +these correspond to location in the West-East, South-North, and vertical +elevation axes respectively. +In data with geographic coordinates, Z values are assumed to be in +metres. In data with projected coordinates, Z values are assumed to have +the same units as the X and Y coordinates.} \item{dem}{Raster overlapping with \code{routes} and values representing elevations} diff --git a/man/sequential_dist.Rd b/man/sequential_dist.Rd index 134ead3..465f151 100644 --- a/man/sequential_dist.Rd +++ b/man/sequential_dist.Rd @@ -7,7 +7,13 @@ sequential_dist(m, lonlat = TRUE) } \arguments{ -\item{m}{Matrix containing coordinates and elevations} +\item{m}{Matrix containing coordinates and elevations. +The matrix should have three columns: x, y, and z. Typically +these correspond to location in the West-East, South-North, and vertical +elevation axes respectively. +In data with geographic coordinates, Z values are assumed to be in +metres. In data with projected coordinates, Z values are assumed to have +the same units as the X and Y coordinates.} \item{lonlat}{Are the coordinates in lon/lat (geographic) coordinates? TRUE by default.} } diff --git a/man/slope_matrix.Rd b/man/slope_matrix.Rd index 49cca6e..5c5e0be 100644 --- a/man/slope_matrix.Rd +++ b/man/slope_matrix.Rd @@ -13,7 +13,13 @@ slope_matrix_mean(m, elevations = m[, 3], lonlat = TRUE) slope_matrix_weighted(m, elevations = m[, 3], lonlat = TRUE) } \arguments{ -\item{m}{Matrix containing coordinates and elevations} +\item{m}{Matrix containing coordinates and elevations. +The matrix should have three columns: x, y, and z. Typically +these correspond to location in the West-East, South-North, and vertical +elevation axes respectively. +In data with geographic coordinates, Z values are assumed to be in +metres. In data with projected coordinates, Z values are assumed to have +the same units as the X and Y coordinates.} \item{elevations}{Elevations in same units as x (assumed to be metres). Default value: \code{m[, 3]}, meaning the 'z' coordinate in a matrix of