Skip to content

Commit c856b7f

Browse files
set.seed() before sample() (#4502)
1 parent 08749f8 commit c856b7f

10 files changed

+10
-0
lines changed

R/position-jitterdodge.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#' @inheritParams position_jitter
1414
#' @export
1515
#' @examples
16+
#' set.seed(596)
1617
#' dsub <- diamonds[sample(nrow(diamonds), 1000), ]
1718
#' ggplot(dsub, aes(x = cut, y = carat, fill = clarity)) +
1819
#' geom_boxplot(outlier.size = 0) +

R/scale-brewer.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#' @rdname scale_brewer
4141
#' @export
4242
#' @examples
43+
#' set.seed(596)
4344
#' dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
4445
#' (d <- ggplot(dsamp, aes(carat, price)) +
4546
#' geom_point(aes(colour = clarity)))

R/scale-hue.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#' @family colour scales
1616
#' @examples
1717
#' \donttest{
18+
#' set.seed(596)
1819
#' dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
1920
#' (d <- ggplot(dsamp, aes(carat, price)) + geom_point(aes(colour = clarity)))
2021
#'

R/scale-shape.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#' @rdname scale_shape
1515
#' @export
1616
#' @examples
17+
#' set.seed(596)
1718
#' dsmall <- diamonds[sample(nrow(diamonds), 100), ]
1819
#'
1920
#' (d <- ggplot(dsmall, aes(carat, price)) + geom_point(aes(shape = cut)))

R/scale-viridis.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#' @export
2121
#' @examples
2222
#' # viridis is the default colour/fill scale for ordered factors
23+
#' set.seed(596)
2324
#' dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
2425
#' ggplot(dsamp, aes(carat, price)) +
2526
#' geom_point(aes(colour = clarity))

man/position_jitterdodge.Rd

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

man/scale_brewer.Rd

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

man/scale_hue.Rd

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

man/scale_shape.Rd

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

man/scale_viridis.Rd

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

0 commit comments

Comments
 (0)