From 5ae6e8c01816d4ecb9c9e6ec11d8ce019a854aac Mon Sep 17 00:00:00 2001 From: js2264 Date: Wed, 3 Apr 2024 12:44:23 +0200 Subject: [PATCH] fix: unique name for book in examples --- R/doc.R | 4 ++-- man/BiocBook-editing.Rd | 2 +- man/BiocBook.Rd | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/doc.R b/R/doc.R index f182f2d..1c9c2e8 100644 --- a/R/doc.R +++ b/R/doc.R @@ -59,7 +59,7 @@ #' #' @examples #' ## In practice, you should not use `.local` argument. -#' unique_id <- sample(c(LETTERS, 0:9), 8) |> paste(collapse = '') +#' unique_id <- as.numeric(Sys.time()) #' bookname <- paste(Sys.info()[['sysname']], unique_id, sep = '.') #' bb <- init(bookname, .local = TRUE) #' add_preamble(bb, open = FALSE) @@ -202,7 +202,7 @@ NULL #' #' @examples #' ## In practice, you should not use `.local` argument. -#' unique_id <- sample(c(LETTERS, 0:9), 8) |> paste(collapse = '') +#' unique_id <- as.numeric(Sys.time()) #' bookname <- paste(Sys.info()[['sysname']], unique_id, sep = '.') #' init(bookname, .local = TRUE) #' bb <- BiocBook(bookname) diff --git a/man/BiocBook-editing.Rd b/man/BiocBook-editing.Rd index 15de224..ea30a45 100644 --- a/man/BiocBook-editing.Rd +++ b/man/BiocBook-editing.Rd @@ -110,7 +110,7 @@ existing Dockerfiles \examples{ ## In practice, you should not use `.local` argument. -unique_id <- sample(c(LETTERS, 0:9), 8) |> paste(collapse = '') +unique_id <- as.numeric(Sys.time()) bookname <- paste(Sys.info()[['sysname']], unique_id, sep = '.') bb <- init(bookname, .local = TRUE) add_preamble(bb, open = FALSE) diff --git a/man/BiocBook.Rd b/man/BiocBook.Rd index 6a75676..1882f61 100644 --- a/man/BiocBook.Rd +++ b/man/BiocBook.Rd @@ -189,7 +189,7 @@ can be listed with \examples{ ## In practice, you should not use `.local` argument. -unique_id <- sample(c(LETTERS, 0:9), 8) |> paste(collapse = '') +unique_id <- as.numeric(Sys.time()) bookname <- paste(Sys.info()[['sysname']], unique_id, sep = '.') init(bookname, .local = TRUE) bb <- BiocBook(bookname)