Skip to content

Commit b10ce59

Browse files
committed
Renamed gridded() to quadrats(); fixes #2
1 parent 0f99b00 commit b10ce59

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export(detect_normal)
99
export(detect_perfect)
1010
export(detect_random)
1111
export(detect_simple)
12-
export(gridded)
1312
export(interp_quadratcount)
1413
export(mosaic)
14+
export(quadrats)
1515
export(rpolygon)
1616
export(sample_random)
1717
export(sample_systematic)

R/sampling.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#' library(ggplot2)
2121
#'
2222
#' rpolygon() %>%
23-
#' gridded(n = c(10, 10)) %>%
23+
#' quadrats(n = c(10, 10)) %>%
2424
#' sample_random(n = 50) %>%
2525
#' ggplot(aes(fill = sample)) + geom_sf()
2626
sample_random <- function(units, n = NULL, fraction = NULL, column = "sample") {
@@ -64,7 +64,7 @@ sample_random <- function(units, n = NULL, fraction = NULL, column = "sample") {
6464
#' library(ggplot2)
6565
#'
6666
#' rpolygon() %>%
67-
#' gridded(n = c(10, 10)) %>%
67+
#' quadrats(n = c(10, 10)) %>%
6868
#' sample_systematic(n = 10) %>%
6969
#' ggplot(aes(fill = sample)) + geom_sf()
7070
sample_systematic <- function(units, n, start = 1, column = "sample") {

R/units.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ rpolygon <- function(crs = 3395, origin = c(0,0), area = 100000,
7171

7272
#' Gridded survey units
7373
#'
74-
#' `gridded()` generates a regular, rectangular grid of survey units over a
74+
#' `quadrats()` generates a regular, rectangular grid of survey units over a
7575
#' frame.
7676
#' `transects()` is a convenience function for when only a single row of units
7777
#' is desired.
@@ -93,15 +93,15 @@ rpolygon <- function(crs = 3395, origin = c(0,0), area = 100000,
9393
#' frame <- rpolygon()
9494
#'
9595
#' # North–south grid
96-
#' grid <- gridded(frame, n = c(10, 10))
96+
#' grid <- quadrats(frame, n = c(10, 10))
9797
#' plot(grid)
9898
#'
9999
#' # NE–SW grid
100-
#' grid <- gridded(frame, n = c(10, 10), orientation = 45)
100+
#' grid <- quadrats(frame, n = c(10, 10), orientation = 45)
101101
#' plot(grid)
102102
#'
103103
#' # Fixed size grid
104-
#' grid <- gridded(frame, size = 100)
104+
#' grid <- quadrats(frame, size = 100)
105105
#' plot(grid)
106106
#'
107107
#' # Transects
@@ -117,7 +117,7 @@ rpolygon <- function(crs = 3395, origin = c(0,0), area = 100000,
117117
#' plot(trans)
118118
#'
119119
#' @importFrom magrittr %>%
120-
gridded <- function(frame, n = NULL, size = NULL, orientation = 0) {
120+
quadrats <- function(frame, n = NULL, size = NULL, orientation = 0) {
121121
checkmate::assert(checkmate::checkNumber(n),
122122
checkmate::checkNumeric(n),
123123
checkmate::checkNull(n))
@@ -163,7 +163,7 @@ gridded <- function(frame, n = NULL, size = NULL, orientation = 0) {
163163
return()
164164
}
165165

166-
#' @rdname gridded
166+
#' @rdname quadrats
167167
#' @export
168168
transects <- function(frame, n = NULL, size = NULL, orientation = 0) {
169169
checkmate::assert(checkmate::checkNumber(n), checkmate::checkNull(n))

man/gridded.Rd renamed to man/quadrats.Rd

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sample_random.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sample_systematic.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)