Skip to content

Commit

Permalink
docs for cran"
Browse files Browse the repository at this point in the history
  • Loading branch information
dcooley committed Sep 27, 2023
1 parent 3ceffc0 commit 60b0b70
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: h3r
Type: Package
Title: Hexagonal Hierarchical Geospatial Indexing System
Version: 0.1.0
Date: 2023-09-26
Date: 2023-09-28
Authors@R: c(
person("David", "Cooley", ,"dcooley@symbolix.com.au", role = c("aut", "cre")),
person("Ray", "Shao", ,"rshao@symbolix.com.au", role = c("aut"))
Expand Down
2 changes: 2 additions & 0 deletions R/indexing.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#' @param lng longitude
#' @param resolution cell resolution
#'
#' @return vector giving the H3 cell for each input lat/lng pair, at the given resolution
#'
#' @examples
#'
#' latLngToCell(
Expand Down
3 changes: 3 additions & 0 deletions R/inspection.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ isPentagon <- function(cell) {
#'
#' getIcosahedronFaces(cell = cellToParent(c("8cbe63562a54bff" ,"8cbe635631103ff"), c(7L, 7L)))
#'
#' @return list of vectors. Each list element corresponds to the input `cell` values.
#' Each vector in a list element gives the faces intersected by the `cell`
#'
#' @export
getIcosahedronFaces <- function(cell) {
.Call(h3rGetIcosahedronFaces, cell)
Expand Down
8 changes: 8 additions & 0 deletions R/miscellaneous.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#'
#' @param deg vector of degrees
#'
#' @return numeric vector giving the input `deg` values as radians
#'
#' @examples
#'
#' degsToRads(deg = seq(0, 360, by = 15))
Expand All @@ -21,6 +23,8 @@ degsToRads <- function(deg) {
#'
#' @param rad vector of radians
#'
#' @return numeric vector giving the input `rad` values as degrees
#'
#' @examples
#' radsToDegs(rad = seq(0, 2 * pi, by = (pi / 12) ) )
#'
Expand Down Expand Up @@ -241,6 +245,8 @@ getPentagons <- function(resolution) {
#' @param bLat vector of latitude coordinates (to)
#' @param bLng vector of longitude coordinates (to)
#'
#' @return numeric vector giving the great circle distance in radians
#'
#' @examples
#'
#' greatCircleDistanceRads(
Expand All @@ -263,6 +269,7 @@ greatCircleDistanceRads <- function(aLat, aLng, bLat, bLng) {
#'
#' @inheritParams greatCircleDistanceRads
#'
#' @return numeric vector giving the great circle distance in metres
#' @examples
#'
#' greatCircleDistanceM(
Expand All @@ -283,6 +290,7 @@ greatCircleDistanceM <- function(aLat, aLng, bLat, bLng) {
#' in kilometers.
#'
#' @inheritParams greatCircleDistanceRads
#' @return numeric vector giving the great circle distance in kilometres
#'
#' @examples
#'
Expand Down
12 changes: 11 additions & 1 deletion R/vertexes.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#' @inheritParams cellToLatLng
#' @param vertexNum integer giving the vertex number of the index to return
#'
#' @return vector of vertex indexes
#'
#' @examples
#'
#' cellToVertex(
Expand All @@ -27,6 +29,10 @@ cellToVertex <- function(cell, vertexNum) {
#'
#' @inheritParams cellToLatLng
#'
#' @return list of vectors giving the vertices of each cell.
#' Each list element corresponds to the cell index given in the `cell` argument,
#' and each element of the vector are the cell vertexes.
#'
#' @examples
#'
#' cellToVertexes(cell = c("8cbe63562a54bff", "8cbe635631103ff") )
Expand All @@ -44,6 +50,8 @@ cellToVertexes <- function(cell) {
#'
#' @param vertex H3 Vertex index
#'
#' @return `data.frame` of the lat/lng coordinates of the input `vertex`
#'
#' @examples
#'
#' vertices <- cellToVertex(
Expand All @@ -62,10 +70,12 @@ vertexToLatLng <- function(vertex) {

#' Is Valid Vertex
#'
#' Returns 1 if the given index represents a valid H3 vertex
#' Tests if the given vertex is a valid H3 vertex
#'
#' @inheritParams vertexToLatLng
#'
#' @return returns 1 if the given index is a valid H3 vertex
#'
#' @examples
#'
#' isValidVertex(vertex = c("24cbe63562a549ff", "abc"))
Expand Down
3 changes: 3 additions & 0 deletions man/cellToVertex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions man/cellToVertexes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/degsToRads.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions man/getIcosahedronFaces.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/greatCircleDistanceKm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/greatCircleDistanceM.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/greatCircleDistanceRads.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/isValidVertex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/latLngToCell.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/radsToDegs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/vertexToLatLng.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 60b0b70

Please sign in to comment.