From 6400c9409035bf6a6686bd30273521cf0a117fb5 Mon Sep 17 00:00:00 2001 From: gfinak Date: Wed, 15 Aug 2018 12:34:43 -0700 Subject: [PATCH] Make document example run shorter. Fix #45 --- R/processData.R | 6 +++--- man/document.Rd | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/processData.R b/R/processData.R index 869403d..75f7122 100644 --- a/R/processData.R +++ b/R/processData.R @@ -695,7 +695,7 @@ project_data_path <- function(file = NULL) { #' f <- tempdir() #' f <- file.path(f,"foo.Rmd") #' con <- file(f) -#' writeLines("```{r}\n tbl = table(sample(1:10,1000,replace=TRUE)) \n```\n",con=con) +#' writeLines("```{r}\n tbl = table(sample(1:10,100,replace=TRUE)) \n```\n",con=con) #' close(con) #' #' # construct a data package skeleton named "MyDataPackage" and pass @@ -711,8 +711,8 @@ project_data_path <- function(file = NULL) { #' #' # call build_package to run the "foo.Rmd" processing and #' # build a data package. -#' package_build(file.path(tempdir(), pname)) -#' document(path = file.path(tempdir(), pname)) +#' package_build(file.path(tempdir(), pname), install = FALSE) +#' document(path = file.path(tempdir(), pname), install=FALSE) document <- function(path = ".", install = TRUE) { usethis::proj_set(path = path) path <- usethis::proj_get() diff --git a/man/document.Rd b/man/document.Rd index c1e9495..4e52416 100644 --- a/man/document.Rd +++ b/man/document.Rd @@ -20,7 +20,7 @@ Build documentation for a data package using DataPackageR. f <- tempdir() f <- file.path(f,"foo.Rmd") con <- file(f) -writeLines("```{r}\\n tbl = table(sample(1:10,1000,replace=TRUE)) \\n```\\n",con=con) +writeLines("```{r}\\n tbl = table(sample(1:10,100,replace=TRUE)) \\n```\\n",con=con) close(con) # construct a data package skeleton named "MyDataPackage" and pass @@ -36,6 +36,6 @@ datapackage_skeleton(name=pname, # call build_package to run the "foo.Rmd" processing and # build a data package. -package_build(file.path(tempdir(), pname)) -document(path = file.path(tempdir(), pname)) +package_build(file.path(tempdir(), pname), install = FALSE) +document(path = file.path(tempdir(), pname), install=FALSE) }