diff --git a/.Rbuildignore b/.Rbuildignore index 2735ea3..968819f 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,4 +12,5 @@ ^LICENSE\.md$ ^README\.Rmd$ ^data-raw$ +^dev$ ^\.github$ diff --git a/DESCRIPTION b/DESCRIPTION index af6527b..85fdc5c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,13 +27,16 @@ Imports: DT, dygraphs, ggplot2 (>= 3.0.0), + htmltools, magrittr, plotly, stats, utils -Suggests: +Suggests: + hexbin, + MASS, testthat Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.1.1 +RoxygenNote: 7.3.3 diff --git a/NAMESPACE b/NAMESPACE index 69040ae..524c5e2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -8,15 +8,18 @@ export(random_ggplot) export(random_ggplotly) export(random_image) export(random_lm) +export(random_mock) export(random_print) export(random_table) export(random_text) importFrom(DT,datatable) importFrom(attempt,stop_if_all) +importFrom(attempt,stop_if_not) importFrom(dygraphs,dygraph) importFrom(ggplot2,aes) importFrom(ggplot2,coord_flip) importFrom(ggplot2,facet_grid) +importFrom(ggplot2,geom_area) importFrom(ggplot2,geom_bar) importFrom(ggplot2,geom_bin2d) importFrom(ggplot2,geom_boxplot) @@ -42,6 +45,9 @@ importFrom(ggplot2,stat) importFrom(ggplot2,theme_minimal) importFrom(ggplot2,xlim) importFrom(ggplot2,ylim) +importFrom(htmltools,HTML) +importFrom(htmltools,tagList) +importFrom(htmltools,tags) importFrom(magrittr,"%>%") importFrom(plotly,ggplotly) importFrom(stats,HoltWinters) diff --git a/NEWS.md b/NEWS.md index 2f5d6e2..aeafbd2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ # shinipsum 0.0.0.9000 -* Added a `NEWS.md` file to track changes to the package. +* `random_ggplot()` gains a `"ts"` type (alias `"timeseries"`) returning a + time-series oriented plot with a `Date` on the x axis (#4). +* New `random_mock()`: builds a quick "zoning" of a Shiny UI as a row of + bordered, labelled bootstrap columns (#1). +* `random_text()` gains a `var` argument to get visually different slices of + the lorem-ipsum corpus on repeated calls (#3). +* Fixed a `ggplot2` deprecation warning in `random_ggplot("line")` + (`size` -> `linewidth`) (#13). diff --git a/R/Mock.R b/R/Mock.R new file mode 100644 index 0000000..a7eb14b --- /dev/null +++ b/R/Mock.R @@ -0,0 +1,94 @@ +#' A Mock UI Layout +#' +#' Build a quick "zoning" of a Shiny UI: a row of bootstrap columns, each one +#' drawn as an empty bordered box with a centered label. Handy to sketch the +#' layout of an app before any real content exists. +#' +#' The returned object is a [htmltools::tagList()] (a self-contained CSS `