diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index f3664da4..00000000 --- a/docs/404.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - -Page not found (404) • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -Content not found. Please use links in the navbar. - -
- - - -
- - - - -
- - - - - - - - diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html deleted file mode 100644 index 4e1997fc..00000000 --- a/docs/LICENSE-text.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - -License • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
YEAR: 2018
-COPYRIGHT HOLDER: dreamRs
-
-The esquisse package as a whole is distributed under GPL-3 (GNU GENERAL PUBLIC
-LICENSE version 3).
-
-
-The esquisse package includes other open source software components. The following
-is a list of these components (full copies of the license agreements used by
-these components are included below):
-
-- dragula, https://github.com/bevacqua/dragula
-- clipboard.js, https://github.com/zenorocha/clipboard.js
-
-
-
-
-Dragula license
----------------
-
-The MIT License (MIT)
-
-Copyright © 2015-2016 Nicolas Bevacqua
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-clipboard.js license
---------------------
-
-The MIT License (MIT)
-Copyright © 2018 Zeno Rocha <hi@zenorocha.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-
-
- -
- - - -
- - - - -
- - - - - - - - diff --git a/docs/apple-touch-icon-120x120.png b/docs/apple-touch-icon-120x120.png deleted file mode 100644 index cf59811e..00000000 Binary files a/docs/apple-touch-icon-120x120.png and /dev/null differ diff --git a/docs/apple-touch-icon-152x152.png b/docs/apple-touch-icon-152x152.png deleted file mode 100644 index 1b1ee983..00000000 Binary files a/docs/apple-touch-icon-152x152.png and /dev/null differ diff --git a/docs/apple-touch-icon-180x180.png b/docs/apple-touch-icon-180x180.png deleted file mode 100644 index 5f458a15..00000000 Binary files a/docs/apple-touch-icon-180x180.png and /dev/null differ diff --git a/docs/apple-touch-icon-60x60.png b/docs/apple-touch-icon-60x60.png deleted file mode 100644 index 1a7721b7..00000000 Binary files a/docs/apple-touch-icon-60x60.png and /dev/null differ diff --git a/docs/apple-touch-icon-76x76.png b/docs/apple-touch-icon-76x76.png deleted file mode 100644 index 15c314dc..00000000 Binary files a/docs/apple-touch-icon-76x76.png and /dev/null differ diff --git a/docs/apple-touch-icon.png b/docs/apple-touch-icon.png deleted file mode 100644 index 84110820..00000000 Binary files a/docs/apple-touch-icon.png and /dev/null differ diff --git a/docs/articles/figures/aesthetics.png b/docs/articles/figures/aesthetics.png deleted file mode 100644 index e8681cfb..00000000 Binary files a/docs/articles/figures/aesthetics.png and /dev/null differ diff --git a/docs/articles/figures/controls-appearance.png b/docs/articles/figures/controls-appearance.png deleted file mode 100644 index e618bf32..00000000 Binary files a/docs/articles/figures/controls-appearance.png and /dev/null differ diff --git a/docs/articles/figures/controls-code.png b/docs/articles/figures/controls-code.png deleted file mode 100644 index d2deaf49..00000000 Binary files a/docs/articles/figures/controls-code.png and /dev/null differ diff --git a/docs/articles/figures/controls-filters.png b/docs/articles/figures/controls-filters.png deleted file mode 100644 index 86bc9c53..00000000 Binary files a/docs/articles/figures/controls-filters.png and /dev/null differ diff --git a/docs/articles/figures/controls-labels.png b/docs/articles/figures/controls-labels.png deleted file mode 100644 index 23e02856..00000000 Binary files a/docs/articles/figures/controls-labels.png and /dev/null differ diff --git a/docs/articles/figures/controls-plot-options.png b/docs/articles/figures/controls-plot-options.png deleted file mode 100644 index cbd59e6e..00000000 Binary files a/docs/articles/figures/controls-plot-options.png and /dev/null differ diff --git a/docs/articles/figures/esquisse.png b/docs/articles/figures/esquisse.png deleted file mode 100644 index 9e5d416d..00000000 Binary files a/docs/articles/figures/esquisse.png and /dev/null differ diff --git a/docs/articles/figures/export-options.png b/docs/articles/figures/export-options.png deleted file mode 100644 index 2b97a105..00000000 Binary files a/docs/articles/figures/export-options.png and /dev/null differ diff --git a/docs/articles/figures/export.png b/docs/articles/figures/export.png deleted file mode 100644 index d9c402b9..00000000 Binary files a/docs/articles/figures/export.png and /dev/null differ diff --git a/docs/articles/figures/geometries.png b/docs/articles/figures/geometries.png deleted file mode 100644 index d2a89676..00000000 Binary files a/docs/articles/figures/geometries.png and /dev/null differ diff --git a/docs/articles/figures/import-data.png b/docs/articles/figures/import-data.png deleted file mode 100644 index b3bb8f3b..00000000 Binary files a/docs/articles/figures/import-data.png and /dev/null differ diff --git a/docs/articles/figures/input-color.png b/docs/articles/figures/input-color.png deleted file mode 100644 index 6ff2373a..00000000 Binary files a/docs/articles/figures/input-color.png and /dev/null differ diff --git a/docs/articles/figures/input-dragula.png b/docs/articles/figures/input-dragula.png deleted file mode 100644 index 5276ed2f..00000000 Binary files a/docs/articles/figures/input-dragula.png and /dev/null differ diff --git a/docs/articles/figures/input-palette.png b/docs/articles/figures/input-palette.png deleted file mode 100644 index 82b046de..00000000 Binary files a/docs/articles/figures/input-palette.png and /dev/null differ diff --git a/docs/articles/figures/launch-addin.png b/docs/articles/figures/launch-addin.png deleted file mode 100644 index 7e76172c..00000000 Binary files a/docs/articles/figures/launch-addin.png and /dev/null differ diff --git a/docs/articles/figures/render-ggplot.png b/docs/articles/figures/render-ggplot.png deleted file mode 100644 index 830304e1..00000000 Binary files a/docs/articles/figures/render-ggplot.png and /dev/null differ diff --git a/docs/articles/get-started.html b/docs/articles/get-started.html deleted file mode 100644 index 463a9ab9..00000000 --- a/docs/articles/get-started.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - -Get started with esquisse • esquisse - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- - - - - - -
-

-Launch the addin

-

In RStudio, you can use the Addins menu :

-

-

Or in the R console :

- -

To use a data.frame by default, if using the Addins menu highlight with the cursor a data.frame in source editor before launching addin. Otherwise, pass the data.frame as first argument to the function :

-
-esquisser(mtcars)
-
-
-

-Import data into {esquisse}

-

If you don’t have used a data.frame when launching the addin, a window to import data will appear.

-

This feature comes from package {datamods}, you can find more documentation about it here.

-

-
-
-

-Create a plot

-

This is the main interface and the most interesting part of the addin (in example below, we use penguins dataset from {palmerpenguins}) :

-

-

You can select aesthetics to used by clicking the gear icon in top right corner, then drag-and-drop into aesthetics boxes to create a plot:

-

-

A geometry is automatically picked to represent the data, according to data type. You can select an other geom with button in top right corner :

-

-
-
-

-Controls

-

Five menus under plot area are available to set plot parameters, filter data and retrieve code to generate the plot.

-
-

-Labels & titles

-

This menu allow to set plot’s title, subtitle, caption, axis and aesthetics labels :

-

-
-
-

-Plot options

-

Here you can modify plot parameters, options available in the menu depends on type of plot :

-

-
-
-

-Appearance

-

Here you can modify colors used and global theme :

-

-
-
-

-Filter

-

Widgets to interactively filter data used in plot :

-

-

The filter module is available in package {datamods}.

-

The code used to filter the data will be available in the following menu.

-
-
-

-Code

-

In this menu, you can retrieve the code used to produce the plot, as well as the code used to filter the data.

-

-

You can copy code to clipboard, or insert it in your current script.

-
-
-
-

-Export

-

You can save the plot created in various format by clicking the button in plot area’s top-right corner:

-

-

With “More options”, you can access a new window with more parameters to export the plot:

-

-
-
-

-Addin options

-

By default, esquisse is launched into a dialog window (if in RStudio), you can choose to use your browser if you prefer, or the Viewer pane.

-
-esquisser(viewer = "browser")
-esquisser(viewer = "pane")
-

You can set display mode with an option (in .Rprofile for example) :

-
-options("esquisse.viewer" = "browser")
-
-
- - - -
- - - - -
- - - - - - diff --git a/docs/articles/get-started_files/header-attrs-2.9/header-attrs.js b/docs/articles/get-started_files/header-attrs-2.9/header-attrs.js deleted file mode 100644 index dd57d92e..00000000 --- a/docs/articles/get-started_files/header-attrs-2.9/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/docs/articles/index.html b/docs/articles/index.html deleted file mode 100644 index b902572e..00000000 --- a/docs/articles/index.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - -Articles • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
-

All vignettes

-

- -
-
Get started with esquisse
-
-
Shiny usage
-
-
-
-
-
- - - -
- - - - - - - - diff --git a/docs/articles/shiny-usage.html b/docs/articles/shiny-usage.html deleted file mode 100644 index 543ff1ed..00000000 --- a/docs/articles/shiny-usage.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - -Shiny usage • esquisse - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- - - - - - -
-

-Use esquisse as a Shiny module

-

{esquisse} is built with Shiny modules (see this article for reference), so you can use {esquisse} directly into a Shiny application :

-
-library(esquisse)
-library(shiny)
-library(ggplot2)
-
-ui <- fluidPage(
-  
-  titlePanel("Use esquisse as a Shiny module"),
-  
-  sidebarLayout(
-    sidebarPanel(
-      radioButtons(
-        inputId = "data", 
-        label = "Select data to use:", 
-        choices = c("mpg", "diamonds", "economics")
-      )
-    ),
-    mainPanel(
-      tabsetPanel(
-        tabPanel(
-          title = "esquisse",
-          esquisse_ui(
-            id = "esquisse", 
-            header = FALSE # dont display gadget title
-          )
-        ),
-        tabPanel(
-          title = "output",
-          tags$b("Code:"),
-          verbatimTextOutput("code"),
-          tags$b("Filters:"),
-          verbatimTextOutput("filters"),
-          tags$b("Data:"),
-          verbatimTextOutput("data")
-        )
-      )
-    )
-  )
-)
-
-
-server <- function(input, output, session) {
-  
-  data_r <- reactiveValues(data = iris, name = "iris")
-  
-  observe({
-    data_r$data <- get(input$data)
-    data_r$name <- input$data
-  })
-  
-  results <- esquisse_server(
-    id = "esquisse",
-    data_rv = data_r
-  )
-  
-  output$code <- renderPrint({
-    results$code_plot
-  })
-  
-  output$filters <- renderPrint({
-    results$code_filters
-  })
-  
-  output$data <- renderPrint({
-    str(results$data)
-  })
-  
-}
-
-shinyApp(ui, server)
-

Result looks like :

-

-

The output of the module is a reactiveValues with 3 slots :

-
    -
  • -code_plot : code to generate plot.
  • -
  • -code_filters : a list of length two with code to reproduce filters.
  • -
  • -data : data.frame used in plot (with filters applied).
  • -
-
-
-

-Module for saving a ggplot object

-

This modulle allow to save a ggplot object in various format and to resize it before:

-

-

You can call the module from server to display it in a modal window (it’s also possible to display it directly in your UI):

-
-function(input, output, session) {
-  
-  observeEvent(input$save, { # actionButton to trigger modal
-    save_ggplot_modal("ID", "Save plot") # launch modal
-  })
-  save_ggplot_server("ID", rv) # rv is a reactiValues with a slot 'plot'
-  
-}
-

See ?"save-ggplot-module" for complete example.

-
-
-

-Module to render a plot and add export options

-

Add a menu to directly export plot, you can also launch module above for more controls (height, width, filename) by clicking “More options”:

-

-
-library(shiny)
-library(ggplot2)
-library(esquisse)
-
-
-ui <- fluidPage(
-  tags$h2("ggplot output"),
-  selectInput("var", "Variable:", names(economics)[-1]),
-  ggplot_output("MYID", width = "600px")
-)
-
-server <- function(input, output, session) {
-  
-  render_ggplot("MYID", {
-    ggplot(economics) + 
-      geom_line(aes(date, !!sym(input$var))) + 
-      theme_minimal() + 
-      labs(
-        title = "A cool chart made with ggplot2",
-        subtitle = "that you can export in various format"
-      )
-  })
-}
-
-if (interactive())
-  shinyApp(ui, server)
-
-
-

-Input widgets

-

The drag-and-drop widget along with the button to select a geom and the color/palette picker are exported:

-
-

-dragulaInput

-
-ui <- fluidPage(
-  tags$h2("Demo dragulaInput"),
-  tags$br(),
-  dragulaInput(
-    inputId = "dad",
-    sourceLabel = "Source",
-    targetsLabels = c("Target 1", "Target 2"),
-    choices = names(iris),
-    width = "400px"
-  ),
-  verbatimTextOutput(outputId = "result")
-)
-
-
-server <- function(input, output, session) {
-  
-  output$result <- renderPrint(str(input$dad))
-
-}
-
-shinyApp(ui = ui, server = server)
-

-
-
-

-dropInput

-

The widget used to select a geom in esquisser addin. You can use images or icons for example:

-
-ui <- fluidPage(
-  tags$h2("Drop Input"),
-  dropInput(
-    inputId = "mydrop",
-    choicesNames = tagList(
-      list(icon("home"), style = "width: 100px;"), 
-      list(icon("flash"), style = "width: 100px;"),
-      list(icon("cogs"), style = "width: 100px;"),
-      list(icon("fire"), style = "width: 100px;"), 
-      list(icon("users"), style = "width: 100px;"), 
-      list(icon("info"), style = "width: 100px;")
-    ), 
-    choicesValues = c("home", "flash", "cogs",
-                      "fire", "users", "info"),
-    dropWidth = "220px"
-  ),
-  verbatimTextOutput(outputId = "res")
-)
-
-server <- function(input, output, session) {
-  output$res <- renderPrint({
-    input$mydrop
-  })
-}
-
-shinyApp(ui, server)
-

-
-
-

-colorPicker

-

A select menu to choose one or several colors:

-
-ui <- fluidPage(
-  tags$h2("Color Picker"),
-  colorPicker(
-    inputId = "col",
-    label = "Choose a color:",
-    choices = scales::brewer_pal(palette = "Dark2")(8),
-    textColor = "white"
-  ),
-  verbatimTextOutput(outputId = "res")
-)
-
-server <- function(input, output, session) {
-  output$res <- renderPrint({
-    input$col
-  })
-}
-
-shinyApp(ui, server)
-

-
-
-

-palettePicker

-

A select menu to choose a color palette:

-
-library(scales)
-ui <- fluidPage(
-  tags$h2("Palette Picker"),
-  palettePicker(
-    inputId = "pal", 
-    label = "Choose a palette", 
-    choices = list(
-      "Viridis" = list(
-        "viridis" = viridis_pal(option = "viridis")(10),
-        "magma" = viridis_pal(option = "magma")(10),
-        "inferno" = viridis_pal(option = "inferno")(10),
-        "plasma" = viridis_pal(option = "plasma")(10),
-        "cividis" = viridis_pal(option = "cividis")(10)
-      ),
-      "Brewer" = list(
-        "Blues" = brewer_pal(palette = "Blues")(8),
-        "Reds" = brewer_pal(palette = "Reds")(8),
-        "Paired" = brewer_pal(palette = "Paired")(8),
-        "Set1" = brewer_pal(palette = "Set1")(8)
-      )
-    ), 
-    textColor = c(
-      rep("white", 5), rep("black", 4) 
-    )
-  ),
-  verbatimTextOutput(outputId = "res")
-)
-
-server <- function(input, output, session) {
-  output$res <- renderPrint({
-    input$pal
-  })
-}
-
-shinyApp(ui, server)
-

-
-
-
- - - -
- - - - -
- - - - - - diff --git a/docs/articles/shiny-usage_files/header-attrs-2.9/header-attrs.js b/docs/articles/shiny-usage_files/header-attrs-2.9/header-attrs.js deleted file mode 100644 index dd57d92e..00000000 --- a/docs/articles/shiny-usage_files/header-attrs-2.9/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/docs/authors.html b/docs/authors.html deleted file mode 100644 index 9e65c994..00000000 --- a/docs/authors.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - -Authors • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
    -
  • -

    Fanny Meyer. Author. -

    -
  • -
  • -

    Victor Perrier. Author, maintainer. -

    -
  • -
  • -

    Ian Carroll. Contributor. -
    Faceting support

    -
  • -
  • -

    Xiangnan Dang. Contributor. -
    Facets rows and cols, X/Y limits

    -
  • -
  • -

    Nicolas Bevacqua. Copyright holder. -
    author of dragula JavaScript library

    -
  • -
  • -

    Daybrush (Younkue Choi). Copyright holder. -
    author of moveable JavaScript library

    -
  • -
  • -

    Zeno Rocha. Copyright holder. -
    author of clipboard JavaScript library

    -
  • -
- -
- -
- - - - -
- - - - - - - - diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css deleted file mode 100644 index 5a859415..00000000 --- a/docs/bootstrap-toc.css +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ - -/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ - -/* All levels of nav */ -nav[data-toggle='toc'] .nav > li > a { - display: block; - padding: 4px 20px; - font-size: 13px; - font-weight: 500; - color: #767676; -} -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 19px; - color: #563d7c; - text-decoration: none; - background-color: transparent; - border-left: 1px solid #563d7c; -} -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 18px; - font-weight: bold; - color: #563d7c; - background-color: transparent; - border-left: 2px solid #563d7c; -} - -/* Nav: second level (shown on .active) */ -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} -nav[data-toggle='toc'] .nav .nav > li > a { - padding-top: 1px; - padding-bottom: 1px; - padding-left: 30px; - font-size: 12px; - font-weight: normal; -} -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 29px; -} -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 28px; - font-weight: 500; -} - -/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ -nav[data-toggle='toc'] .nav > .active > ul { - display: block; -} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js deleted file mode 100644 index 1cdd573b..00000000 --- a/docs/bootstrap-toc.js +++ /dev/null @@ -1,159 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ -(function() { - 'use strict'; - - window.Toc = { - helpers: { - // return all matching elements in the set, or their descendants - findOrFilter: function($el, selector) { - // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ - // http://stackoverflow.com/a/12731439/358804 - var $descendants = $el.find(selector); - return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); - }, - - generateUniqueIdBase: function(el) { - var text = $(el).text(); - var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); - return anchor || el.tagName.toLowerCase(); - }, - - generateUniqueId: function(el) { - var anchorBase = this.generateUniqueIdBase(el); - for (var i = 0; ; i++) { - var anchor = anchorBase; - if (i > 0) { - // add suffix - anchor += '-' + i; - } - // check if ID already exists - if (!document.getElementById(anchor)) { - return anchor; - } - } - }, - - generateAnchor: function(el) { - if (el.id) { - return el.id; - } else { - var anchor = this.generateUniqueId(el); - el.id = anchor; - return anchor; - } - }, - - createNavList: function() { - return $(''); - }, - - createChildNavList: function($parent) { - var $childList = this.createNavList(); - $parent.append($childList); - return $childList; - }, - - generateNavEl: function(anchor, text) { - var $a = $(''); - $a.attr('href', '#' + anchor); - $a.text(text); - var $li = $('
  • '); - $li.append($a); - return $li; - }, - - generateNavItem: function(headingEl) { - var anchor = this.generateAnchor(headingEl); - var $heading = $(headingEl); - var text = $heading.data('toc-text') || $heading.text(); - return this.generateNavEl(anchor, text); - }, - - // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). - getTopLevel: function($scope) { - for (var i = 1; i <= 6; i++) { - var $headings = this.findOrFilter($scope, 'h' + i); - if ($headings.length > 1) { - return i; - } - } - - return 1; - }, - - // returns the elements for the top level, and the next below it - getHeadings: function($scope, topLevel) { - var topSelector = 'h' + topLevel; - - var secondaryLevel = topLevel + 1; - var secondarySelector = 'h' + secondaryLevel; - - return this.findOrFilter($scope, topSelector + ',' + secondarySelector); - }, - - getNavLevel: function(el) { - return parseInt(el.tagName.charAt(1), 10); - }, - - populateNav: function($topContext, topLevel, $headings) { - var $context = $topContext; - var $prevNav; - - var helpers = this; - $headings.each(function(i, el) { - var $newNav = helpers.generateNavItem(el); - var navLevel = helpers.getNavLevel(el); - - // determine the proper $context - if (navLevel === topLevel) { - // use top level - $context = $topContext; - } else if ($prevNav && $context === $topContext) { - // create a new level of the tree and switch to it - $context = helpers.createChildNavList($prevNav); - } // else use the current $context - - $context.append($newNav); - - $prevNav = $newNav; - }); - }, - - parseOps: function(arg) { - var opts; - if (arg.jquery) { - opts = { - $nav: arg - }; - } else { - opts = arg; - } - opts.$scope = opts.$scope || $(document.body); - return opts; - } - }, - - // accepts a jQuery object, or an options object - init: function(opts) { - opts = this.helpers.parseOps(opts); - - // ensure that the data attribute is in place for styling - opts.$nav.attr('data-toggle', 'toc'); - - var $topContext = this.helpers.createChildNavList(opts.$nav); - var topLevel = this.helpers.getTopLevel(opts.$scope); - var $headings = this.helpers.getHeadings(opts.$scope, topLevel); - this.helpers.populateNav($topContext, topLevel, $headings); - } - }; - - $(function() { - $('nav[data-toggle="toc"]').each(function(i, el) { - var $nav = $(el); - Toc.init($nav); - }); - }); -})(); diff --git a/docs/docsearch.css b/docs/docsearch.css deleted file mode 100644 index e5f1fe1d..00000000 --- a/docs/docsearch.css +++ /dev/null @@ -1,148 +0,0 @@ -/* Docsearch -------------------------------------------------------------- */ -/* - Source: https://github.com/algolia/docsearch/ - License: MIT -*/ - -.algolia-autocomplete { - display: block; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1 -} - -.algolia-autocomplete .ds-dropdown-menu { - width: 100%; - min-width: none; - max-width: none; - padding: .75rem 0; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .1); - box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); -} - -@media (min-width:768px) { - .algolia-autocomplete .ds-dropdown-menu { - width: 175% - } -} - -.algolia-autocomplete .ds-dropdown-menu::before { - display: none -} - -.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { - padding: 0; - background-color: rgb(255,255,255); - border: 0; - max-height: 80vh; -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { - margin-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion { - padding: 0; - overflow: visible -} - -.algolia-autocomplete .algolia-docsearch-suggestion--category-header { - padding: .125rem 1rem; - margin-top: 0; - font-size: 1.3em; - font-weight: 500; - color: #00008B; - border-bottom: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { - float: none; - padding-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { - float: none; - width: auto; - padding: 0; - text-align: left -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content { - float: none; - width: auto; - padding: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content::before { - display: none -} - -.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { - padding-top: .75rem; - margin-top: .75rem; - border-top: 1px solid rgba(0, 0, 0, .1) -} - -.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { - display: block; - padding: .1rem 1rem; - margin-bottom: 0.1; - font-size: 1.0em; - font-weight: 400 - /* display: none */ -} - -.algolia-autocomplete .algolia-docsearch-suggestion--title { - display: block; - padding: .25rem 1rem; - margin-bottom: 0; - font-size: 0.9em; - font-weight: 400 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--text { - padding: 0 1rem .5rem; - margin-top: -.25rem; - font-size: 0.8em; - font-weight: 400; - line-height: 1.25 -} - -.algolia-autocomplete .algolia-docsearch-footer { - width: 110px; - height: 20px; - z-index: 3; - margin-top: 10.66667px; - float: right; - font-size: 0; - line-height: 0; -} - -.algolia-autocomplete .algolia-docsearch-footer--logo { - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 50%; - background-size: 100%; - overflow: hidden; - text-indent: -9000px; - width: 100%; - height: 100%; - display: block; - transform: translate(-8px); -} - -.algolia-autocomplete .algolia-docsearch-suggestion--highlight { - color: #FF8C00; - background: rgba(232, 189, 54, 0.1) -} - - -.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { - box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) -} - -.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { - background-color: rgba(192, 192, 192, .15) -} diff --git a/docs/docsearch.js b/docs/docsearch.js deleted file mode 100644 index b35504cd..00000000 --- a/docs/docsearch.js +++ /dev/null @@ -1,85 +0,0 @@ -$(function() { - - // register a handler to move the focus to the search bar - // upon pressing shift + "/" (i.e. "?") - $(document).on('keydown', function(e) { - if (e.shiftKey && e.keyCode == 191) { - e.preventDefault(); - $("#search-input").focus(); - } - }); - - $(document).ready(function() { - // do keyword highlighting - /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ - var mark = function() { - - var referrer = document.URL ; - var paramKey = "q" ; - - if (referrer.indexOf("?") !== -1) { - var qs = referrer.substr(referrer.indexOf('?') + 1); - var qs_noanchor = qs.split('#')[0]; - var qsa = qs_noanchor.split('&'); - var keyword = ""; - - for (var i = 0; i < qsa.length; i++) { - var currentParam = qsa[i].split('='); - - if (currentParam.length !== 2) { - continue; - } - - if (currentParam[0] == paramKey) { - keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); - } - } - - if (keyword !== "") { - $(".contents").unmark({ - done: function() { - $(".contents").mark(keyword); - } - }); - } - } - }; - - mark(); - }); -}); - -/* Search term highlighting ------------------------------*/ - -function matchedWords(hit) { - var words = []; - - var hierarchy = hit._highlightResult.hierarchy; - // loop to fetch from lvl0, lvl1, etc. - for (var idx in hierarchy) { - words = words.concat(hierarchy[idx].matchedWords); - } - - var content = hit._highlightResult.content; - if (content) { - words = words.concat(content.matchedWords); - } - - // return unique words - var words_uniq = [...new Set(words)]; - return words_uniq; -} - -function updateHitURL(hit) { - - var words = matchedWords(hit); - var url = ""; - - if (hit.anchor) { - url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; - } else { - url = hit.url + '?q=' + escape(words.join(" ")); - } - - return url; -} diff --git a/docs/favicon-16x16.png b/docs/favicon-16x16.png deleted file mode 100644 index bcde96c9..00000000 Binary files a/docs/favicon-16x16.png and /dev/null differ diff --git a/docs/favicon-32x32.png b/docs/favicon-32x32.png deleted file mode 100644 index 1a47b9cc..00000000 Binary files a/docs/favicon-32x32.png and /dev/null differ diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index c6d02ab5..00000000 Binary files a/docs/favicon.ico and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 82c8d19b..00000000 --- a/docs/index.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - -Explore and Visualize Your Data Interactively • esquisse - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    -
    -
    - -
    -

    The purpose of this add-in is to let you explore your data quickly to extract the information they hold. You can create visualization with {ggplot2}, filter data with {dplyr} and retrieve generated code.

    -
    - -

    version cranlogs Lifecycle: stable R build status

    -

    This addin allows you to interactively explore your data by visualizing it with the ggplot2 package. It allows you to draw bar plots, curves, scatter plots, histograms, boxplot and sf objects, then export the graph or retrieve the code to reproduce the graph.

    -

    See online documentation : https://dreamrs.github.io/esquisse/index.html

    -

    If you find bugs, please open an issue

    -
    -

    -Installation

    -

    Install from CRAN with :

    -
    -install.packages("esquisse")
    -

    Or install development version from GitHub :

    -
    -remotes::install_github("dreamRs/esquisse")
    -

    Then launch the addin via the RStudio menu or with esquisse::esquisser().

    -
    -
    -

    -esquisse addin

    -
    -esquisse::esquisser()
    -# or with your data:
    -esquisse::esquisser(palmerpenguins::penguins)
    -

    -

    Above gif was made with ❤️ by @mfanny and cannot be removed, but in the meantime {esquisse} has evolved, the latest version now looks like:

    -

    -
    -
    -
    - - -
    - - - -
    - - - - - - diff --git a/docs/link.svg b/docs/link.svg deleted file mode 100644 index 88ad8276..00000000 --- a/docs/link.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/docs/logo.png b/docs/logo.png deleted file mode 100644 index bc196352..00000000 Binary files a/docs/logo.png and /dev/null differ diff --git a/docs/news/index.html b/docs/news/index.html deleted file mode 100644 index 0c55ab38..00000000 --- a/docs/news/index.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - - -Changelog • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    -esquisse 1.0.2 2021-07-05 -

    - -
    -
    -

    -esquisse 1.0.1 2021-04-20 -

    -
      -
    • Corrected a bug when using sf objects (fix #147).
    • -
    • Use pkg::data notation if data used in addin comes from a package (fix #150).
    • -
    • Corrected a bug when labs’ input controls when the panel is disabled (fix #148)
    • -
    -
    -
    -

    -esquisse 1.0.0 2021-04-12 -

    -
      -
    • Ability to select aesthetics parameters to use
    • -
    • New module to import data from package datamods -
    • -
    • Possibility to define a manual color palette
    • -
    • More format for exporting plots: png, pdf, svg, jpeg, pptx
    • -
    • New function to render a ggplot and add export options: ggplot_output() / render_ggplot() -
    • -
    • New module to export a plot: save_ggplot_ui() / save_ggplot_server() -
    • -
    • Options for setting title, subtitle, axis labels font size / weight, alignment
    • -
    • Added geom step
    • -
    • ability to select shape if aesthetic is used
    • -
    • Allowing geom_point when plotting Time vs Continuous Data by @matton2 -
    • -
    -
    -
    -

    -esquisse 0.3.1 2020-09-27 -

    - -
    -
    -

    -esquisse 0.3.0 2020-01-27 -

    -
      -
    • Fixed a bug in dragulaInput preventing to change variable in main addin.
    • -
    • -chooseDataServer() has a new argument selectedTypes to set types of variables selected by default. #95 -
    • -
    • Packages {ggthemes} and {hrbrthemes} are now in Suggests.
    • -
    -
    -
    -

    -esquisse 0.2.3 2020-01-09 -

    -
      -
    • New argument disable_filters in esquisserUI() to disable the ability to filter data.
    • -
    • Enable bookmarking for module filterDF.
    • -
    • -filterDF() module handle missing values correctly.
    • -
    • -filterDF() has two new arguments : drop_ids : logical, drop or not column with only unique values, picker allow to use shinyWidgets::pickerInput.
    • -
    • Code generated : no more affectation in {dplyr} code, a pipe is used to send code to {ggplot2} (mentioned in #79)
    • -
    -
    -
    -

    -esquisse 0.2.2 2019-08-22 -

    -
      -
    • Added esquisseContainer() to better integrate esquisse module in a shiny application.
    • -
    • New functions colorPicker() and palettePicker() to select a color or a palette (this is the select control used in the main addin).
    • -
    • New argument insert_code in esquisserUI() to hide “Insert into script button”.
    • -
    -
    -

    -Breaking changes

    -
      -
    • -

      When using esquisse module into a shiny, it’s not necessary anymore to put esquisseUI into a container, one is now added via argument esquisseUI(container = ...) :

      -
      -
      -# old
      -tags$div(
      -  style = "height: 700px;",
      -  esquisserUI(
      -    id = "esquisse"
      -  )
      -)
      -
      -# new 
      -esquisserUI(
      -  id = "esquisse", 
      -  container = esquisseContainer(height = "700px")
      -)
      -
    • -
    -
    -
    -
    -

    -esquisse 0.2.1 2019-07-01 -

    -
      -
    • Fix bug when adding smooth line (missing import for geom_smooth).
    • -
    • Support for themes and scales (color/fill) from {hrbrthemes}.
    • -
    • Set labels for fill, color and size aesthetics.
    • -
    -
    -
    -

    -esquisse 0.2.0 2019-06-20 -

    -
      -
    • Now use rlang to generate ggplot code.
    • -
    • Code generated when filtering data is available above ggplot code, it use dplyr syntax. #19, #46 -
    • -
    • Ability to set scales argument in facet_wrap (fixed, free, free_x, free_y). #47 -
    • -
    • Support for scales continuous transformation (log1p, log, sqrt, reverse, …). #24 -
    • -
    -
    -
    -

    -esquisse 0.1.8 Unreleased -

    -
      -
    • Support for group aesthetic.
    • -
    • New supported geom: geom_area.
    • -
    -
    -
    -

    -esquisse 0.1.7 2018-11-14 -

    -
      -
    • Play/Pause button to stop reactivity when creating a plot (prevent plot to update each time you make a change).
    • -
    • Support for palette from viridisLite.
    • -
    -
    -
    -

    -esquisse 0.1.6 2018-10-26 -

    -
      -
    • Support for sf objects.
    • -
    • Use esquisse as a shiny module.
    • -
    • Facets support thanks to @itcarroll (#30)
    • -
    • New import data modules.
    • -
    • Fix a bug when launching addin in RStudio #25 -
    • -
    -
    -
    -

    -esquisse 0.1.5 2018-09-28 -

    -
      -
    • Module to coerce a variable to a different type.
    • -
    • Scroll when data have a lot of variables.
    • -
    • Prevent filter for discrete variables with over 100 unique elements.
    • -
    -
    -
    -

    -esquisse 0.1.0 Unreleased -

    -
      -
    • Addin to make ggplot.
    • -
    -
    -
    - - - -
    - - - -
    - - - - - - - - diff --git a/docs/pkgdown.css b/docs/pkgdown.css deleted file mode 100644 index 1273238d..00000000 --- a/docs/pkgdown.css +++ /dev/null @@ -1,367 +0,0 @@ -/* Sticky footer */ - -/** - * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ - * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css - * - * .Site -> body > .container - * .Site-content -> body > .container .row - * .footer -> footer - * - * Key idea seems to be to ensure that .container and __all its parents__ - * have height set to 100% - * - */ - -html, body { - height: 100%; -} - -body { - position: relative; -} - -body > .container { - display: flex; - height: 100%; - flex-direction: column; -} - -body > .container .row { - flex: 1 0 auto; -} - -footer { - margin-top: 45px; - padding: 35px 0 36px; - border-top: 1px solid #e5e5e5; - color: #666; - display: flex; - flex-shrink: 0; -} -footer p { - margin-bottom: 0; -} -footer div { - flex: 1; -} -footer .pkgdown { - text-align: right; -} -footer p { - margin-bottom: 0; -} - -img.icon { - float: right; -} - -img { - max-width: 100%; -} - -/* Fix bug in bootstrap (only seen in firefox) */ -summary { - display: list-item; -} - -/* Typographic tweaking ---------------------------------*/ - -.contents .page-header { - margin-top: calc(-60px + 1em); -} - -dd { - margin-left: 3em; -} - -/* Section anchors ---------------------------------*/ - -a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; - - background-image: url(./link.svg); - background-repeat: no-repeat; - background-size: 20px 20px; - background-position: center center; -} - -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } -} - - -/* Fixes for fixed navbar --------------------------*/ - -.contents h1, .contents h2, .contents h3, .contents h4 { - padding-top: 60px; - margin-top: -40px; -} - -/* Navbar submenu --------------------------*/ - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu>.dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover>.dropdown-menu { - display: block; -} - -.dropdown-submenu>a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #cccccc; - margin-top: 5px; - margin-right: -10px; -} - -.dropdown-submenu:hover>a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left>.dropdown-menu { - left: -100%; - margin-left: 10px; - border-radius: 6px 0 6px 6px; -} - -/* Sidebar --------------------------*/ - -#pkgdown-sidebar { - margin-top: 30px; - position: -webkit-sticky; - position: sticky; - top: 70px; -} - -#pkgdown-sidebar h2 { - font-size: 1.5em; - margin-top: 1em; -} - -#pkgdown-sidebar h2:first-child { - margin-top: 0; -} - -#pkgdown-sidebar .list-unstyled li { - margin-bottom: 0.5em; -} - -/* bootstrap-toc tweaks ------------------------------------------------------*/ - -/* All levels of nav */ - -nav[data-toggle='toc'] .nav > li > a { - padding: 4px 20px 4px 6px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; -} - -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 5px; - color: inherit; - border-left: 1px solid #878787; -} - -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 5px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; - border-left: 2px solid #878787; -} - -/* Nav: second level (shown on .active) */ - -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} - -nav[data-toggle='toc'] .nav .nav > li > a { - padding-left: 16px; - font-size: 1.35rem; -} - -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 15px; -} - -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 15px; - font-weight: 500; - font-size: 1.35rem; -} - -/* orcid ------------------------------------------------------------------- */ - -.orcid { - font-size: 16px; - color: #A6CE39; - /* margins are required by official ORCID trademark and display guidelines */ - margin-left:4px; - margin-right:4px; - vertical-align: middle; -} - -/* Reference index & topics ----------------------------------------------- */ - -.ref-index th {font-weight: normal;} - -.ref-index td {vertical-align: top; min-width: 100px} -.ref-index .icon {width: 40px;} -.ref-index .alias {width: 40%;} -.ref-index-icons .alias {width: calc(40% - 40px);} -.ref-index .title {width: 60%;} - -.ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} -.ref-arguments .name {width: 20%;} -.ref-arguments .desc {width: 80%;} - -/* Nice scrolling for wide elements --------------------------------------- */ - -table { - display: block; - overflow: auto; -} - -/* Syntax highlighting ---------------------------------------------------- */ - -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { - background-color: #f8f8f8; - color: #333; -} - -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; -} - -pre .img { - margin: 5px 0; -} - -pre .img img { - background-color: #fff; - display: block; - height: auto; -} - -code a, pre a { - color: #375f84; -} - -a.sourceLine:hover { - text-decoration: none; -} - -.fl {color: #1514b5;} -.fu {color: #000000;} /* function */ -.ch,.st {color: #036a07;} /* string */ -.kw {color: #264D66;} /* keyword */ -.co {color: #888888;} /* comment */ - -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} - -/* Clipboard --------------------------*/ - -.hasCopyButton { - position: relative; -} - -.btn-copy-ex { - position: absolute; - right: 0; - top: 0; - visibility: hidden; -} - -.hasCopyButton:hover button.btn-copy-ex { - visibility: visible; -} - -/* headroom.js ------------------------ */ - -.headroom { - will-change: transform; - transition: transform 200ms linear; -} -.headroom--pinned { - transform: translateY(0%); -} -.headroom--unpinned { - transform: translateY(-100%); -} - -/* mark.js ----------------------------*/ - -mark { - background-color: rgba(255, 255, 51, 0.5); - border-bottom: 2px solid rgba(255, 153, 51, 0.3); - padding: 1px; -} - -/* vertical spacing after htmlwidgets */ -.html-widget { - margin-bottom: 10px; -} - -/* fontawesome ------------------------ */ - -.fab { - font-family: "Font Awesome 5 Brands" !important; -} - -/* don't display links in code chunks when printing */ -/* source: https://stackoverflow.com/a/10781533 */ -@media print { - code a:link:after, code a:visited:after { - content: ""; - } -} diff --git a/docs/pkgdown.js b/docs/pkgdown.js deleted file mode 100644 index 7e7048fa..00000000 --- a/docs/pkgdown.js +++ /dev/null @@ -1,108 +0,0 @@ -/* http://gregfranko.com/blog/jquery-best-practices/ */ -(function($) { - $(function() { - - $('.navbar-fixed-top').headroom(); - - $('body').css('padding-top', $('.navbar').height() + 10); - $(window).resize(function(){ - $('body').css('padding-top', $('.navbar').height() + 10); - }); - - $('[data-toggle="tooltip"]').tooltip(); - - var cur_path = paths(location.pathname); - var links = $("#navbar ul li a"); - var max_length = -1; - var pos = -1; - for (var i = 0; i < links.length; i++) { - if (links[i].getAttribute("href") === "#") - continue; - // Ignore external links - if (links[i].host !== location.host) - continue; - - var nav_path = paths(links[i].pathname); - - var length = prefix_length(nav_path, cur_path); - if (length > max_length) { - max_length = length; - pos = i; - } - } - - // Add class to parent
  • , and enclosing
  • if in dropdown - if (pos >= 0) { - var menu_anchor = $(links[pos]); - menu_anchor.parent().addClass("active"); - menu_anchor.closest("li.dropdown").addClass("active"); - } - }); - - function paths(pathname) { - var pieces = pathname.split("/"); - pieces.shift(); // always starts with / - - var end = pieces[pieces.length - 1]; - if (end === "index.html" || end === "") - pieces.pop(); - return(pieces); - } - - // Returns -1 if not found - function prefix_length(needle, haystack) { - if (needle.length > haystack.length) - return(-1); - - // Special case for length-0 haystack, since for loop won't run - if (haystack.length === 0) { - return(needle.length === 0 ? 0 : -1); - } - - for (var i = 0; i < haystack.length; i++) { - if (needle[i] != haystack[i]) - return(i); - } - - return(haystack.length); - } - - /* Clipboard --------------------------*/ - - function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-original-title'); - element.setAttribute('data-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-original-title', tooltipOriginalTitle); - } - - if(ClipboardJS.isSupported()) { - $(document).ready(function() { - var copyButton = ""; - - $(".examples, div.sourceCode").addClass("hasCopyButton"); - - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); - - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); - - // Initialize clipboard: - var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent; - } - }); - - clipboardBtnCopies.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); - - clipboardBtnCopies.on('error', function() { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); - }); - } -})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml deleted file mode 100644 index 7c1dfd75..00000000 --- a/docs/pkgdown.yml +++ /dev/null @@ -1,8 +0,0 @@ -pandoc: 2.11.4 -pkgdown: 1.6.1 -pkgdown_sha: ~ -articles: - get-started: get-started.html - shiny-usage: shiny-usage.html -last_built: 2021-07-07T14:02Z - diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png deleted file mode 100644 index 17a35806..00000000 Binary files a/docs/reference/Rplot001.png and /dev/null differ diff --git a/docs/reference/build_aes-1.png b/docs/reference/build_aes-1.png deleted file mode 100644 index 0fc337a3..00000000 Binary files a/docs/reference/build_aes-1.png and /dev/null differ diff --git a/docs/reference/build_aes.html b/docs/reference/build_aes.html deleted file mode 100644 index 11baf24d..00000000 --- a/docs/reference/build_aes.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - -Build aesthetics to use in a plot — build_aes • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Build aesthetics to use in a plot

    -
    - -
    build_aes(data, ..., .list = NULL, geom = NULL)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    data

    Data to use in the plot.

    ...

    Named list of aesthetics.

    .list

    Alternative to ... to use a preexisting named list.

    geom

    Geom to use, according to the geom aesthetics may vary.

    - -

    Value

    - -

    An expression

    - -

    Examples

    -
    # Classic -build_aes(iris, x = "Sepal.Width") -
    #> Aesthetic mapping: -#> * `x` -> `Sepal.Width`
    build_aes(iris, x = "Sepal.Width", y = "Sepal.Width") -
    #> Aesthetic mapping: -#> * `x` -> `Sepal.Width` -#> * `y` -> `Sepal.Width`
    -# Explicit geom : no change -build_aes(iris, x = "Species", geom = "bar") -
    #> Aesthetic mapping: -#> * `x` -> `Species`
    -# Little trick if data is count data -df <- data.frame( - LET = c("A", "B"), - VAL = c(4, 7) -) -build_aes(df, x = "LET", y = "VAL", geom = "bar") -
    #> Aesthetic mapping: -#> * `x` -> `LET` -#> * `weight` -> `VAL`
    -# e.g. : -library(ggplot2) -ggplot(df) + - build_aes(df, x = "LET", y = "VAL", geom = "bar") + - geom_bar() -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/dragulaInput.html b/docs/reference/dragulaInput.html deleted file mode 100644 index 52d94628..00000000 --- a/docs/reference/dragulaInput.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - -Drag And Drop Input Widget — dragulaInput • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Drag And Drop Input Widget

    -
    - -
    dragulaInput(
    -  inputId,
    -  label = NULL,
    -  sourceLabel,
    -  targetsLabels,
    -  targetsIds = NULL,
    -  choices = NULL,
    -  choiceNames = NULL,
    -  choiceValues = NULL,
    -  selected = NULL,
    -  status = "primary",
    -  replace = FALSE,
    -  copySource = TRUE,
    -  badge = TRUE,
    -  ncolSource = "auto",
    -  ncolGrid = NULL,
    -  dragulaOpts = list(),
    -  boxStyle = NULL,
    -  width = NULL,
    -  height = "100px"
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    inputId

    The input slot that will be used to access the value.

    label

    Display label for the control, or NULL for no label.

    sourceLabel

    Label display in the source box

    targetsLabels

    Labels for each target element.

    targetsIds

    Ids for retrieving values server-side, if NULL, the default, -targetsLabels are used after removing all not-alphanumeric characters.

    choices

    List of values to select from (if elements of the list are -named then that name rather than the value is displayed to the user). -If this argument is provided, then choiceNames and choiceValues must -not be provided, and vice-versa. The values should be strings; other -types (such as logicals and numbers) will be coerced to strings.

    choiceNames, choiceValues

    List of names and values, respectively, -that are displayed to the user in the app and correspond to the each -choice (for this reason, choiceNames and choiceValues must have the same length). -If either of these arguments is provided, then the other must be provided and -choices must not be provided. The advantage of using both of these over a named -list for choices is that choiceNames allows any type of UI object to be passed -through (tag objects, icons, HTML code, ...), instead of just simple text.

    selected

    Default selected values. Must be a list with targetsIds as names.

    status

    If choices are displayed into a Bootstrap label, you can use Bootstrap -status to color them, or NULL.

    replace

    When a choice is dragged in a target container already -containing a choice, does the later be replaced by the new one ?

    copySource

    When replace = TRUE, does elements in source must be copied or moved ?

    badge

    Displays choices inside a Bootstrap badge. Use FALSE -if you want to pass custom appearance with choiceNames.

    ncolSource

    Number of columns occupied by the source, default is "auto", meaning full row.

    ncolGrid

    Number of columns used to place source and targets boxes, see examples.

    dragulaOpts

    Options passed to dragula JavaScript library.

    boxStyle

    CSS style string to customize source and target container.

    width

    Width of the input.

    height

    Height of each boxes, the total input height is this parameter X 2.

    - -

    Value

    - -

    a UI definition

    -

    Note

    - -

    The output server-side is a list with two slots: source and targets.

    -

    See also

    - -

    updateDragulaInput to update choices server-side.

    - -

    Examples

    -
    library(shiny) -library(esquisse) - -ui <- fluidPage( - tags$h2("Demo dragulaInput"), - tags$br(), - fluidRow( - column( - width = 6, - - dragulaInput( - inputId = "dad1", - label = "Default:", - sourceLabel = "Source", - targetsLabels = c("Target 1", "Target 2"), - choices = month.abb, - width = "100%" - ), - verbatimTextOutput(outputId = "result1"), - - tags$br(), - - dragulaInput( - inputId = "dad3", - label = "On same row:", - sourceLabel = "Source", - targetsLabels = c("Target 1", "Target 2"), - choices = month.abb, - width = "100%", - ncolSource = 1, - ncolGrid = 3 - ), - verbatimTextOutput(outputId = "result3") - ), - - column( - width = 6, - dragulaInput( - inputId = "dad2", - label = "Two rows:", - sourceLabel = "Source", - targetsLabels = c("x", "y", "color", "fill", "size", "facet"), - choices = names(mtcars), - width = "100%", - ncolGrid = 3 - ), - verbatimTextOutput(outputId = "result2"), - - tags$br(), - - dragulaInput( - inputId = "dad4", - label = "Two rows not filled:", - sourceLabel = "Source", - targetsLabels = c("x", "y", "color", "fill", "size"), - choices = names(mtcars), - width = "100%", - ncolGrid = 3 - ), - verbatimTextOutput(outputId = "result4") - ) - ) -) - - -server <- function(input, output, session) { - - output$result1 <- renderPrint(str(input$dad1)) - - output$result2 <- renderPrint(str(input$dad2)) - - output$result3 <- renderPrint(str(input$dad3)) - - output$result4 <- renderPrint(str(input$dad4)) - -} - -if (interactive()) - shinyApp(ui = ui, server = server) - - -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/dropInput.html b/docs/reference/dropInput.html deleted file mode 100644 index 6adfed88..00000000 --- a/docs/reference/dropInput.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - -Dropdown Input — dropInput • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    A dropdown menu for selecting a value.

    -
    - -
    dropInput(
    -  inputId,
    -  choicesNames,
    -  choicesValues,
    -  selected = NULL,
    -  dropUp = FALSE,
    -  dropWidth = NULL,
    -  dropMaxHeight = NULL,
    -  dropPreScrollable = FALSE,
    -  btnClass = "btn-link",
    -  width = NULL
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    inputId

    The input slot that will be used to access the value.

    choicesNames

    A tagList of HTML tags to show in the dropdown menu.

    choicesValues

    Vector corresponding to choicesNames -for retrieving values server-side.

    selected

    The initial selected value, must be an element of choicesValues, -default to the first item of choicesValues.

    dropUp

    Open the menu above the button rather than below.

    dropWidth

    Width of the dropdown menu.

    dropMaxHeight

    Maximal height for the menu.

    dropPreScrollable

    Force scroll bar to appear in the menu.

    btnClass

    Class for buttons in dropdown menu, default is "btn-link", -you can use for example "btn-default" to display regular buttons.

    width

    The width of the input.

    - -

    See also

    - - - -

    Examples

    -
    if (interactive()) { - - library(shiny) - library(esquisse) - - ui <- fluidPage( - tags$h2("Drop Input"), - dropInput( - inputId = "mydrop", - choicesNames = tagList( - list(icon("home"), style = "width: 100px;"), - list(icon("flash"), style = "width: 100px;"), - list(icon("cogs"), style = "width: 100px;"), - list(icon("fire"), style = "width: 100px;"), - list(icon("users"), style = "width: 100px;"), - list(icon("info"), style = "width: 100px;") - ), - choicesValues = c("home", "flash", "cogs", - "fire", "users", "info"), - dropWidth = "220px" - ), - verbatimTextOutput(outputId = "res") - ) - - server <- function(input, output, session) { - output$res <- renderPrint({ - input$mydrop - }) - } - - shinyApp(ui, server) - -} -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/esquisse-deprecated.html b/docs/reference/esquisse-deprecated.html deleted file mode 100644 index c69770f6..00000000 --- a/docs/reference/esquisse-deprecated.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - -Deprecated functions — esquisse-deprecated • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Deprecated functions

    -
    - - - -

    Note

    - -

    The following functions are deprecated and will be removed in next release:

      -
    • esquisserUI / esquisserServer: replaced by esquisse_ui / esquisse_server

    • -
    • filterDF_UI / filterDF: moved to package datamods

    • -
    • chooseDataUI / chooseDataServer: moved to package datamods

    • -
    • coerceUI / coerceServer: moved to package datamods

    • -
    - - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/esquisse-module.html b/docs/reference/esquisse-module.html deleted file mode 100644 index b3f5d354..00000000 --- a/docs/reference/esquisse-module.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - - -Esquisse module — esquisse-module • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Use esquisse as a module in a Shiny application.

    -
    - -
    esquisse_ui(
    -  id,
    -  header = TRUE,
    -  container = esquisseContainer(),
    -  controls = c("labs", "parameters", "appearance", "filters", "code"),
    -  insert_code = FALSE
    -)
    -
    -esquisse_server(
    -  id,
    -  data_rv = NULL,
    -  default_aes = c("fill", "color", "size", "group", "facet"),
    -  import_from = c("env", "file", "copypaste", "googlesheets")
    -)
    -
    -esquisseContainer(width = "100%", height = "700px", fixed = FALSE)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    id

    Module ID.

    header

    Logical. Display or not esquisse header.

    container

    Container in which display the addin, -default is to use esquisseContainer, see examples. -Use NULL for no container (behavior in versions <= 0.2.1). -Must be a function.

    controls

    Controls menu to be displayed. Use NULL to hide all menus.

    insert_code

    Logical, Display or not a button to insert the ggplot -code in the current user script (work only in RStudio).

    data_rv

    A reactiveValues with at least a slot data containing a data.frame -to use in the module. And a slot name corresponding to the name of the data.frame.

    default_aes

    Default aesthetics to be used, can be a character -vector or reactive function returning one.

    import_from

    From where to import data, argument passed -to datamods::import_ui.

    width, height

    The width and height of the container, e.g. "400px", -or "100%"; see validateCssUnit.

    fixed

    Use a fixed container, e.g. to use use esquisse full page. -If TRUE, width and height are ignored. Default to FALSE. -It's possible to use a vector of CSS unit of length 4 to specify the margins -(top, right, bottom, left).

    - -

    Value

    - -

    A reactiveValues with 3 slots :

      -
    • code_plot : code to generate plot.

    • -
    • code_filters : a list of length two with code to reproduce filters.

    • -
    • data : data.frame used in plot (with filters applied).

    • -
    - - -

    Examples

    -
    -### Part of a Shiny app ### - -library(shiny) -library(esquisse) - -ui <- fluidPage( - tags$h1("Use esquisse as a Shiny module"), - - radioButtons( - inputId = "data", - label = "Data to use:", - choices = c("iris", "mtcars"), - inline = TRUE - ), - checkboxGroupInput( - inputId = "aes", - label = "Aesthetics to use:", - choices = c( - "fill", "color", "size", "shape", - "weight", "group", "facet", "facet_row", "facet_col" - ), - selected = c("fill", "color", "size", "facet"), - inline = TRUE - ), - esquisse_ui( - id = "esquisse", - header = FALSE, # dont display gadget title - container = esquisseContainer(height = "700px") - ) -) - -server <- function(input, output, session) { - - data_rv <- reactiveValues(data = iris, name = "iris") - - observeEvent(input$data, { - if (input$data == "iris") { - data_rv$data <- iris - data_rv$name <- "iris" - } else { - data_rv$data <- mtcars - data_rv$name <- "mtcars" - } - }) - - esquisse_server( - id = "esquisse", - data_rv = data_rv, - default_aes = reactive(input$aes) - ) - -} - -if (interactive()) - shinyApp(ui, server) - - -### Whole Shiny app ### - -library(shiny) -library(esquisse) - - -# Load some datasets in app environment -my_data <- data.frame( - var1 = rnorm(100), - var2 = sample(letters[1:5], 100, TRUE) -) - - -ui <- fluidPage( - esquisse_ui( - id = "esquisse", - container = esquisseContainer(fixed = TRUE) - ) -) - -server <- function(input, output, session) { - - esquisse_server(id = "esquisse") - -} - -if (interactive()) - shinyApp(ui, server) - - - -## You can also use a vector of margins for the fixed argument, -# useful if you have a navbar for example - -library(shiny) -library(esquisse) -library(datamods) - -ui <- navbarPage( - title = "My navbar app", - tabPanel( - title = "esquisse", - esquisse_ui( - id = "esquisse", - header = FALSE, - container = esquisseContainer( - fixed = c(55, 0, 0, 0) - ) - ) - ) -) - -server <- function(input, output, session) { - - # lauch import data modal - import_modal( - id = "import-data", - from = c("env", "file", "copypaste"), - title = "Import data" - ) - data_imported_r <- datamods::import_server("import-data") - - data_rv <- reactiveValues(data = data.frame()) - observeEvent(data_imported_r$data(), { - data_rv$data <- data_imported_r$data() - data_rv$name <- data_imported_r$name() - }) - - esquisse_server(id = "esquisse", data_rv = data_rv) - -} - -if (interactive()) - shinyApp(ui, server) -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/esquisser.html b/docs/reference/esquisser.html deleted file mode 100644 index c3c7249a..00000000 --- a/docs/reference/esquisser.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - -An add-in to easily create plots with ggplot2 — esquisser • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Select data to be used and map variables to aesthetics to produce a chart, -customize common elements and get code to reproduce the chart.

    -
    - -
    esquisser(
    -  data = NULL,
    -  controls = c("labs", "parameters", "appearance", "filters", "code"),
    -  viewer = getOption(x = "esquisse.viewer", default = "dialog")
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    data

    a data.frame, you can pass a data.frame explicitly to the function, -otherwise you'll have to choose one in global environment.

    controls

    Controls menu to be displayed. Use NULL to hide all menus.

    viewer

    Where to display the gadget: "dialog", -"pane" or "browser" (see viewer).

    - -

    Value

    - -

    NULL. You can view code used to produce the chart, copy it or insert it in current script.

    - -

    Examples

    -
    if (interactive()) { -# Launch with : -esquisser(iris) -# If in RStudio it will be launched by default in dialog window -# If not, it will be launched in browser - -# Launch esquisse in browser : -esquisser(iris, viewer = "browser") - -# You can set this option in .Rprofile : -options("esquisse.viewer" = "viewer") -# or -options("esquisse.viewer" = "browser") - -# esquisse use shiny::runApp -# see ?shiny::runApp to see options -# available, example to use custom port: - -options("shiny.port" = 8080) -esquisser(iris, viewer = "browser") - -} -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/figures/esquisse.gif b/docs/reference/figures/esquisse.gif deleted file mode 100644 index c28bb4dd..00000000 Binary files a/docs/reference/figures/esquisse.gif and /dev/null differ diff --git a/docs/reference/figures/esquisse.png b/docs/reference/figures/esquisse.png deleted file mode 100644 index fd49a78e..00000000 Binary files a/docs/reference/figures/esquisse.png and /dev/null differ diff --git a/docs/reference/figures/logo.png b/docs/reference/figures/logo.png deleted file mode 100644 index bc196352..00000000 Binary files a/docs/reference/figures/logo.png and /dev/null differ diff --git a/docs/reference/ggcall-1.png b/docs/reference/ggcall-1.png deleted file mode 100644 index efe46076..00000000 Binary files a/docs/reference/ggcall-1.png and /dev/null differ diff --git a/docs/reference/ggcall.html b/docs/reference/ggcall.html deleted file mode 100644 index 5ff8e5cf..00000000 --- a/docs/reference/ggcall.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - -Generate code to create a ggplot2 — ggcall • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Generate code to create a ggplot2

    -
    - -
    ggcall(
    -  data = NULL,
    -  mapping = NULL,
    -  geom = NULL,
    -  geom_args = list(),
    -  scales = NULL,
    -  scales_args = list(),
    -  coord = NULL,
    -  labs = list(),
    -  theme = NULL,
    -  theme_args = list(),
    -  facet = NULL,
    -  facet_row = NULL,
    -  facet_col = NULL,
    -  facet_args = list(),
    -  xlim = NULL,
    -  ylim = NULL
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    data

    Character. Name of the data.frame.

    mapping

    List. Named list of aesthetics.

    geom

    Character. Name of the geom to use (with or without "geom_").

    geom_args

    List. Arguments to use in the geom.

    scales

    Character vector. Scale(s) to use (with or without "scale_").

    scales_args

    List. Arguments to use in scale(s), -if scales is length > 1, must be a named list with scales names.

    coord

    Character. Coordinates to use (with or without "coord_").

    labs

    List. Named list of labels to use for title, subtitle, x & y axis, legends.

    theme

    Character. Name of the theme to use (with or without "theme_").

    theme_args

    Named list. Arguments for theme.

    facet

    Character vector. Names of variables to use in facet_wrap.

    facet_row

    Character vector. Names of row variables to use in facet_grid.

    facet_col

    Character vector. Names of col variables to use in facet_grid.

    facet_args

    Named list. Arguments for facet_wrap.

    xlim

    A vector of length 2 representing limits on x-axis.

    ylim

    A vector of length 2 representing limits on y-axis.

    - -

    Value

    - -

    a call that can be evaluated with eval.

    - -

    Examples

    -
    # Default: -ggcall() -
    #> ggplot()
    -# With data and aes -ggcall("mtcars", list(x = "mpg", y = "wt")) -
    #> ggplot(mtcars) + aes(x = mpg, y = wt)
    -# Evaluate the call -library(ggplot2) -eval(ggcall("mtcars", list(x = "mpg", y = "wt"))) -
    - -# With a geom: -ggcall( - data = "mtcars", - mapping = list(x = "mpg", y = "wt"), - geom = "point" -) -
    #> ggplot(mtcars) + aes(x = mpg, y = wt) + geom_point()
    -# With options -ggcall( - data = "mtcars", - mapping = list(x = "hp", y = "cyl", fill = "color"), - geom = "bar", - coord = "flip", - labs = list(title = "My title"), - theme = "minimal", - facet = c("gear", "carb"), - theme_args = list(legend.position = "bottom") -) -
    #> ggplot(mtcars) + aes(x = hp, y = cyl, fill = color) + geom_bar() + -#> labs(title = "My title") + coord_flip() + theme_minimal() + -#> theme(legend.position = "bottom") + facet_wrap(vars(gear, -#> carb))
    -# Theme -ggcall( - "mtcars", list(x = "mpg", y = "wt"), - theme = "theme_minimal", - theme_args = list( - panel.ontop = TRUE, - legend.title = rlang::expr(element_text(face = "bold")) - ) -) -
    #> ggplot(mtcars) + aes(x = mpg, y = wt) + theme_minimal() + theme(panel.ontop = TRUE, -#> legend.title = element_text(face = "bold"))
    -# Theme from other package than ggplot2 -ggcall( - "mtcars", list(x = "mpg", y = "wt"), - theme = "ggthemes::theme_economist" -) -
    #> ggplot(mtcars) + aes(x = mpg, y = wt) + ggthemes::theme_economist()
    - -# One scale -ggcall( - data = "mtcars", - mapping = list(x = "mpg", y = "wt", color = "qsec"), - geom = "point", - scales = "color_distiller", - scales_args = list(palette = "Blues") -) -
    #> ggplot(mtcars) + aes(x = mpg, y = wt, color = qsec) + geom_point() + -#> scale_color_distiller(palette = "Blues")
    -# Two scales -ggcall( - data = "mtcars", - mapping = list(x = "mpg", y = "wt", color = "qsec", size = "qsec"), - geom = "point", - scales = c("color_distiller", "size_continuous"), - scales_args = list( - color_distiller = list(palette = "Greens"), - size_continuous = list(range = c(1, 20)) - ) -) -
    #> ggplot(mtcars) + aes(x = mpg, y = wt, color = qsec, size = qsec) + -#> geom_point() + scale_color_distiller(palette = "Greens") + -#> scale_size_continuous(range = c(1, 20))
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/ggplot-output.html b/docs/reference/ggplot-output.html deleted file mode 100644 index 375995c1..00000000 --- a/docs/reference/ggplot-output.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - - -Render ggplot module — ggplot-output • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Display a plot on the client and allow to download it.

    -
    - -
    ggplot_output(
    -  id,
    -  width = "100%",
    -  height = "400px",
    -  downloads = downloads_labels(),
    -  ...
    -)
    -
    -downloads_labels(
    -  label = icon("download"),
    -  png = tagList(icon("file-image-o"), "PNG"),
    -  pdf = tagList(icon("file-pdf-o"), "PDF"),
    -  svg = tagList(icon("chrome"), "SVG"),
    -  jpeg = tagList(icon("file-image-o"), "JPEG"),
    -  pptx = tagList(icon("file-powerpoint-o"), "PPTX"),
    -  more = tagList(icon("gear"), "More options")
    -)
    -
    -render_ggplot(
    -  id,
    -  expr,
    -  ...,
    -  env = parent.frame(),
    -  quoted = FALSE,
    -  filename = "export-ggplot"
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    id

    Module ID.

    width

    Width of the plot.

    height

    Height of the plot.

    downloads

    Labels for export options, use downloads_labels.

    ...

    Parameters passed to plotOutput or renderPlot.

    label

    Main label for export button

    png, pdf, svg, jpeg, pptx

    Labels to display in -export menu, use NULL to disable specific format.

    more

    Label for "more" button, allowing to launch export modal.

    expr

    An expression that generates a ggplot object.

    env

    The environment in which to evaluate expression.

    quoted

    Is expr a quoted expression (with quote())? This -is useful if you want to save an expression in a variable.

    filename

    A string of the filename to export WITHOUT extension, -it will be added according to type of export.

    - -

    Value

    - -

    Server-side, a reactiveValues with the plot.

    - -

    Examples

    -
    -library(shiny) -library(ggplot2) -library(esquisse) - - -ui <- fluidPage( - tags$h2("ggplot output"), - selectInput("var", "Variable:", names(economics)[-1]), - ggplot_output("MYID", width = "600px") -) - -server <- function(input, output, session) { - - render_ggplot("MYID", { - ggplot(economics) + - geom_line(aes(date, !!sym(input$var))) + - theme_minimal() + - labs( - title = "A cool chart made with ggplot2", - subtitle = "that you can export in various format" - ) - }) -} - -if (interactive()) - shinyApp(ui, server) -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/ggplot_to_ppt.html b/docs/reference/ggplot_to_ppt.html deleted file mode 100644 index 1f32f43f..00000000 --- a/docs/reference/ggplot_to_ppt.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - -Utility to export ggplot objects to PowerPoint — ggplot_to_ppt • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    You can use the RStudio addin to interactively select ggplot objects, or -directly pass their names to the function.

    -
    - -
    ggplot_to_ppt(gg = NULL)
    - -

    Arguments

    - - - - - - -
    gg

    character. Name(s) of ggplot object(s), if NULL, launch the Shiny gadget.

    - -

    Value

    - -

    Path to the temporary PowerPoint file.

    - -

    Examples

    -
    -# Shiny gadget -if (interactive()) { - -ggplot_to_ppt() - - - -# Or with an object's name -library(ggplot2) -p <- ggplot(iris) + - geom_point(aes(Sepal.Length, Sepal.Width)) - -ggplot_to_ppt("p") - -} - -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/index.html b/docs/reference/index.html deleted file mode 100644 index 3a2908e3..00000000 --- a/docs/reference/index.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - -Function reference • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    All functions

    -

    -
    -

    build_aes()

    -

    Build aesthetics to use in a plot

    -

    dragulaInput()

    -

    Drag And Drop Input Widget

    -

    dropInput()

    -

    Dropdown Input

    -

    esquisse-deprecated

    -

    Deprecated functions

    -

    esquisse_ui() esquisse_server() esquisseContainer()

    -

    Esquisse module

    -

    esquisser()

    -

    An add-in to easily create plots with ggplot2

    -

    ggcall()

    -

    Generate code to create a ggplot2

    -

    ggplot_output() downloads_labels() render_ggplot()

    -

    Render ggplot module

    -

    ggplot_to_ppt()

    -

    Utility to export ggplot objects to PowerPoint

    -

    colorPicker() updateColorPicker() palettePicker() updatePalettePicker()

    -

    Picker input to select color(s) or palette

    -

    match_geom_args()

    -

    Match list of arguments to arguments of geometry

    -

    chooseDataUI() chooseDataServer()

    -

    Module for choosing data.frame

    -

    coerceUI() coerceServer()

    -

    Coerce data.frame's columns module

    -

    esquisserServer() esquisserUI()

    -

    Esquisse Shiny module

    -

    filterDF_UI() filterDF()

    -

    Shiny module to interactively filter a data.frame

    -

    potential_geoms()

    -

    Potential geometries according to the data

    -

    run_module()

    -

    Run module example

    -

    safe_ggplot()

    -

    Safely render a ggplot in Shiny application

    -

    save_ggplot_ui() save_ggplot_modal() save_ggplot_server()

    -

    Save ggplot module

    -

    updateDragulaInput()

    -

    Update Dragula Input

    -

    updateDropInput()

    -

    Change the value of a drop input on the client

    -

    which_pal_scale()

    -

    Automatically select appropriate color scale

    -
    - - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/input-colors.html b/docs/reference/input-colors.html deleted file mode 100644 index d43c48cd..00000000 --- a/docs/reference/input-colors.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - - - - - -Picker input to select color(s) or palette — input-colors • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Select menu to view and choose a color or a palette of colors.

    -
    - -
    colorPicker(
    -  inputId,
    -  label,
    -  choices,
    -  selected = NULL,
    -  textColor = "#000",
    -  plainColor = FALSE,
    -  multiple = FALSE,
    -  pickerOpts = list(),
    -  width = NULL
    -)
    -
    -updateColorPicker(
    -  session = getDefaultReactiveDomain(),
    -  inputId,
    -  choices,
    -  textColor = "#000",
    -  plainColor = FALSE,
    -  multiple = FALSE
    -)
    -
    -palettePicker(
    -  inputId,
    -  label,
    -  choices,
    -  selected = NULL,
    -  textColor = "#000",
    -  plainColor = FALSE,
    -  pickerOpts = list(),
    -  width = NULL
    -)
    -
    -updatePalettePicker(
    -  session = getDefaultReactiveDomain(),
    -  inputId,
    -  choices,
    -  selected = NULL,
    -  textColor = "#000",
    -  plainColor = FALSE
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    inputId

    The input slot that will be used to access the value.

    label

    Display label for the control, or NULL for no label.

    choices

    List of values to select from. Values must be valid Hex colors. -If elements of the list are named then that name rather than the value is displayed to the user.

    selected

    The initially selected value (or multiple values if multiple = TRUE). -If not specified then defaults to the first value for single-select lists and no values for multiple select lists.

    textColor

    Color of the text displayed above colors, can be a vector of the same length as choices.

    plainColor

    Color the full space of the choice menu.

    multiple

    Is selection of multiple items allowed?

    pickerOpts

    Options for pickerInput.

    width

    The width of the input : 'auto', 'fit', '100px', '75%'.

    session

    Shiny session.

    - -

    Value

    - -

    A select control that can be added to a UI definition.

    - -

    Examples

    -
    -# colorPicker ------------------------------------------------------------- - -library(shiny) -library(esquisse) -library(scales) - - -ui <- fluidPage( - tags$h2("colorPicker examples"), - fluidRow( - column( - width = 3, - colorPicker( - inputId = "col1", - label = "With a vector of colors:", - choices = brewer_pal(palette = "Dark2")(8) - ), - verbatimTextOutput("res1"), - colorPicker( - inputId = "col5", - label = "Update colors:", - choices = brewer_pal(palette = "Blues", direction = -1)(8), - textColor = "#FFF" - ), - verbatimTextOutput("res5"), - radioButtons( - "update", "Colors", c("Blues", "Greens", "Reds"), - inline = TRUE - ) - ), - column( - width = 3, - colorPicker( - inputId = "col2", - label = "Change text color:", - choices = brewer_pal(palette = "Blues")(8), - textColor = c("black", "black", "black", "white", - "white", "white", "white", "white") - ), - verbatimTextOutput("res2") - ), - column( - width = 3, - colorPicker( - inputId = "col3", - label = "With a list of vector of colors:", - choices = list( - "Blues" = brewer_pal(palette = "Blues")(8), - "Reds" = brewer_pal(palette = "Reds")(8), - "Greens" = brewer_pal(palette = "Greens")(8) - ) - ), - verbatimTextOutput("res3") - ), - column( - width = 3, - colorPicker( - inputId = "col4", - label = "Plain color & multiple choices:", - choices = brewer_pal(palette = "Paired")(8), - plainColor = TRUE, - multiple = TRUE, - pickerOpts = list(`selected-text-format`= "count > 3") - ), - verbatimTextOutput("res4") - ) - ) -) - -server <- function(input, output, session) { - - output$res1 <- renderPrint(input$col1) - output$res2 <- renderPrint(input$col2) - output$res3 <- renderPrint(input$col3) - output$res4 <- renderPrint(input$col4) - output$res5 <- renderPrint(input$col5) - - observeEvent(input$update, { - updateColorPicker( - inputId = "col5", - choices = brewer_pal(palette = input$update, direction = -1)(8), - textColor = "#FFF" - ) - }) - -} - -if (interactive()) { - shinyApp(ui, server) -} - -# palettePicker ----------------------------------------------------------- - -library(shiny) -library(esquisse) -library(scales) - -ui <- fluidPage( - tags$h2("pickerColor examples"), - - fluidRow( - column( - width = 4, - palettePicker( - inputId = "pal1", - label = "Select a palette:", - choices = list( - "Blues" = brewer_pal(palette = "Blues")(8), - "Reds" = brewer_pal(palette = "Reds")(8) - ) - ), - verbatimTextOutput("res1"), - palettePicker( - inputId = "pal4", - label = "Update palette:", - choices = list( - "Blues" = brewer_pal(palette = "Blues")(8), - "Reds" = brewer_pal(palette = "Reds")(8) - ) - ), - verbatimTextOutput("res4"), - radioButtons( - "update", "Palettes:", c("default", "viridis", "brewer"), - inline = TRUE - ) - ), - column( - width = 4, - palettePicker( - inputId = "pal2", - label = "With a list of palette:", - choices = list( - "Viridis" = list( - "viridis" = viridis_pal(option = "viridis")(10), - "magma" = viridis_pal(option = "magma")(10), - "inferno" = viridis_pal(option = "inferno")(10), - "plasma" = viridis_pal(option = "plasma")(10), - "cividis" = viridis_pal(option = "cividis")(10) - ), - "Brewer" = list( - "Blues" = brewer_pal(palette = "Blues")(8), - "Reds" = brewer_pal(palette = "Reds")(8), - "Paired" = brewer_pal(palette = "Paired")(8), - "Set1" = brewer_pal(palette = "Set1")(8) - ) - ), - textColor = c( - rep("white", 5), rep("black", 4) - ) - ), - verbatimTextOutput("res2") - ), - column( - width = 4, - palettePicker( - inputId = "pal3", - label = "With plain colors:", - choices = list( - "BrBG" = brewer_pal(palette = "BrBG")(8), - "PiYG" = brewer_pal(palette = "PiYG")(8), - "PRGn" = brewer_pal(palette = "PRGn")(8), - "PuOr" = brewer_pal(palette = "PuOr")(8), - "RdBu" = brewer_pal(palette = "RdBu")(8), - "RdGy" = brewer_pal(palette = "RdGy")(8), - "RdYlBu" = brewer_pal(palette = "RdYlBu")(8), - "RdYlGn" = brewer_pal(palette = "RdYlGn")(8), - "Spectral" = brewer_pal(palette = "Spectral")(8) - ), - plainColor = TRUE, - textColor = "white" - ), - verbatimTextOutput("res3") - ) - ) -) - -server <- function(input, output, session) { - - output$res1 <- renderPrint(input$pal1) - output$res2 <- renderPrint(input$pal2) - output$res3 <- renderPrint(input$pal3) - output$res4 <- renderPrint(input$pal4) - - observeEvent(input$update, { - if (input$update == "default") { - updatePalettePicker( - inputId = "pal4", - choices = list( - "Blues" = brewer_pal(palette = "Blues")(8), - "Reds" = brewer_pal(palette = "Reds")(8) - ) - ) - } else if (input$update == "viridis") { - updatePalettePicker( - inputId = "pal4", - choices = list( - "viridis" = viridis_pal(option = "viridis")(10), - "magma" = viridis_pal(option = "magma")(10), - "inferno" = viridis_pal(option = "inferno")(10), - "plasma" = viridis_pal(option = "plasma")(10), - "cividis" = viridis_pal(option = "cividis")(10) - ), - textColor = "#FFF" - ) - } else if (input$update == "brewer") { - updatePalettePicker( - inputId = "pal4", - choices = list( - "Blues" = brewer_pal(palette = "Blues")(8), - "Reds" = brewer_pal(palette = "Reds")(8), - "Paired" = brewer_pal(palette = "Paired")(8), - "Set1" = brewer_pal(palette = "Set1")(8) - ) - ) - } - }) -} - -if (interactive()) { - shinyApp(ui, server) -} -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/match_geom_args.html b/docs/reference/match_geom_args.html deleted file mode 100644 index 4f73c904..00000000 --- a/docs/reference/match_geom_args.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - -Match list of arguments to arguments of geometry — match_geom_args • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Match list of arguments to arguments of geometry

    -
    - -
    match_geom_args(
    -  geom,
    -  args,
    -  add_aes = TRUE,
    -  mapping = list(),
    -  envir = "ggplot2"
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - -
    geom

    Character. name of the geometry.

    args

    Named list, parameters to be matched to the geometry arguments.

    add_aes

    Add aesthetics parameters (like size, fill, ...).

    mapping

    Mapping used in plot, to avoid setting fixed aesthetics parameters.

    envir

    Package environment to search in.

    - -

    Value

    - -

    a list

    - -

    Examples

    -
    # List of parameters -params <- list( - bins = 30, - scale = "width", - adjust = 2, - position = "stack", - size = 1.6, - fill = "#112246" -) - -# Search arguments according to geom -match_geom_args(geom = "histogram", args = params) -
    #> $bins -#> [1] 30 -#> -#> $fill -#> [1] "#112246" -#>
    match_geom_args(geom = "violin", args = params) -
    #> $scale -#> [1] "width" -#> -#> $adjust -#> [1] 2 -#> -#> $fill -#> [1] "#112246" -#>
    match_geom_args(geom = "bar", args = params, add_aes = FALSE) -
    #> named list()
    match_geom_args(geom = "point", args = params) -
    #> $size -#> [1] 1.6 -#> -#> $fill -#> [1] "#112246" -#>
    match_geom_args(geom = "point", args = params, add_aes = FALSE) -
    #> named list()
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/module-chooseData.html b/docs/reference/module-chooseData.html deleted file mode 100644 index 9b18a7d5..00000000 --- a/docs/reference/module-chooseData.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - - -Module for choosing data.frame — module-chooseData • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    DEPRECATED, please see package datamods for similar features.

    -
    - -
    chooseDataUI(id, label = "Data", icon = "database", width = "100%", ...)
    -
    -chooseDataServer(
    -  input,
    -  output,
    -  session,
    -  dataModule = c("GlobalEnv", "ImportFile"),
    -  data = NULL,
    -  name = NULL,
    -  selectVars = TRUE,
    -  selectedTypes = c("continuous", "discrete", "time"),
    -  coerceVars = FALSE,
    -  launchOnStart = TRUE,
    -  size = "m"
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    id

    Module's id.

    label

    Label for button, passed to actionButton.

    icon

    Icon to appears on the button, passed to actionButton.

    width

    Width of button, passed to actionButton.

    ...

    Other arguments passed to actionButton

    input, output, session

    standards shiny server arguments.

    dataModule

    Data module to use, choose between "GlobalEnv" -(select ad data.frame from Global environment) -or "ImportFile" (import an external file supported by import).

    data

    A data.frame to use by default.

    name

    Character, object's name to use for data.

    selectVars

    Display module to select variables, TRUE by default.

    selectedTypes

    Type of variables selected by default in select variables module. -Possible types are "discrete", "time", "continuous" and "id", -by default "id" is discarded.

    coerceVars

    Display module to coerce variables between different class, TRUE by default.

    launchOnStart

    Opens modal window when the application starts.

    size

    Size for the modal window.

    - -

    Value

    - -

    a reactiveValues containing the data selected under slot data -and the name of the selected data.frame under slot name.

    - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/module-coerce.html b/docs/reference/module-coerce.html deleted file mode 100644 index 1ed196bc..00000000 --- a/docs/reference/module-coerce.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - -Coerce data.frame's columns module — module-coerce • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    DEPRECATED, please see package datamods for similar features.

    -
    - -
    coerceUI(id)
    -
    -coerceServer(input, output, session, data, reactiveValuesSlot = "data")
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    id

    Module id. See callModule.

    input, output, session

    standards shiny server arguments.²

    data

    A data.frame or a reactive -function returning a data.frame or a -reactivevalues with a slot containing a data.frame -(use reactiveValuesSlot to identify that slot)

    reactiveValuesSlot

    If data is a reactivevalues, -specify the name of the slot containing data.

    - -

    Value

    - -

    a reactiveValues with two slots: data original data.frame -with modified columns, and names column's names with call to coerce method.

    - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/module-esquisse.html b/docs/reference/module-esquisse.html deleted file mode 100644 index d1105a78..00000000 --- a/docs/reference/module-esquisse.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - - -Esquisse Shiny module — esquisserServer • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    DEPRECATED, see esquisse-module.

    -
    - -
    esquisserServer(
    -  input,
    -  output,
    -  session,
    -  data = NULL,
    -  dataModule = c("GlobalEnv", "ImportFile"),
    -  sizeDataModule = "m"
    -)
    -
    -esquisserUI(
    -  id,
    -  header = TRUE,
    -  container = esquisseContainer(),
    -  choose_data = TRUE,
    -  insert_code = FALSE,
    -  disable_filters = FALSE
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    input, output, session

    Standards shiny server arguments.

    data

    A reactiveValues with at least a slot data containing a data.frame -to use in the module. And a slot name corresponding to the name of the data.frame.

    dataModule

    Data module to use, choose between "GlobalEnv" -or "ImportFile".

    sizeDataModule

    Size for the modal window for selecting data.

    id

    Module's id.

    header

    Logical. Display or not esquisse header.

    container

    Container in which display the addin, -default is to use esquisseContainer, see examples. -Use NULL for no container (behavior in versions <= 0.2.1). -Must be a function.

    choose_data

    Logical. Display or not the button to choose data.

    insert_code

    Logical, Display or not a button to insert the ggplot -code in the current user script (work only in RStudio).

    disable_filters

    Logical. Disable the menu allowing to filter data used.

    - -

    Value

    - -

    A reactiveValues with 3 slots :

      -
    • code_plot : code to generate plot.

    • -
    • code_filters : a list of length two with code to reproduce filters.

    • -
    • data : data.frame used in plot (with filters applied).

    • -
    - -

    Note

    - -

    For the module to display correctly, it is necessary to place -it in a container with a fixed height. Since version >= 0.2.2, the -container is added by default.

    - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/module-filterDF.html b/docs/reference/module-filterDF.html deleted file mode 100644 index 07253ec2..00000000 --- a/docs/reference/module-filterDF.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - -Shiny module to interactively filter a data.frame — module-filterDF • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    DEPRECATED, please see package datamods for similar features.

    -
    - -
    filterDF_UI(id, show_nrow = TRUE)
    -
    -filterDF(
    -  input,
    -  output,
    -  session,
    -  data_table = reactive(),
    -  data_vars = shiny::reactive(NULL),
    -  data_name = reactive("data"),
    -  label_nrow = "Number of rows:",
    -  drop_ids = TRUE,
    -  picker = FALSE
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    id

    Module id. See callModule.

    show_nrow

    Show number of filtered rows and total.

    input, output, session

    standards shiny server arguments.

    data_table

    reactive function returning a -data.frame to filter.

    data_vars

    reactive function returning a -character vector of variable to use for filters.

    data_name

    reactive function returning a -character string representing data_table name.

    label_nrow

    Text to display before the number of rows of filtered data / source data.

    drop_ids

    Drop columns containing more than 90% of unique values, or than 50 distinct values.

    picker

    Use shinyWidgets::pickerInput -instead of shiny::selectizeInput (default).

    - -

    Value

    - -

    A list with 2 elements :

      -
    • data_filtered : reactive function returning data filtered.

    • -
    • code : reactiveValues with 2 slots : -expr (raw expression to filter data) and dplyr (code with dplyr pipeline).

    • -
    - - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/potential_geoms.html b/docs/reference/potential_geoms.html deleted file mode 100644 index cdf3490b..00000000 --- a/docs/reference/potential_geoms.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - -Potential geometries according to the data — potential_geoms • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Potential geometries according to the data

    -
    - -
    potential_geoms(data, mapping, auto = FALSE)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    data

    A data.frame

    mapping

    List of aesthetic mappings to use with data.

    auto

    Return only one geometry.

    - -

    Value

    - -

    A character vector

    - -

    Examples

    -
    -library(ggplot2) - -# One continuous variable -potential_geoms( - data = iris, - mapping = aes(x = Sepal.Length) -) -
    #> [1] "histogram" "boxplot" "violin" "density"
    -# Automatic pick a geom -potential_geoms( - data = iris, - mapping = aes(x = Sepal.Length), - auto = TRUE -) -
    #> [1] "histogram"
    -# One discrete variable -potential_geoms( - data = iris, - mapping = aes(x = Species) -) -
    #> [1] "bar"
    -# Two continuous variables -potential_geoms( - data = iris, - mapping = aes(x = Sepal.Length, y = Sepal.Width) -) -
    #> [1] "point" "line" "step" "area" "tile"
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/run_module.html b/docs/reference/run_module.html deleted file mode 100644 index e7e0d322..00000000 --- a/docs/reference/run_module.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - -Run module example — run_module • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    DEPRECATED, please see package datamods for similar features.

    -
    - -
    run_module(module = c("filterDF", "chooseData", "chooseData2", "coerce"))
    - -

    Arguments

    - - - - - - -
    module

    Module for which to see a demo.

    - - -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/safe_ggplot.html b/docs/reference/safe_ggplot.html deleted file mode 100644 index 1f12580f..00000000 --- a/docs/reference/safe_ggplot.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - -Safely render a ggplot in Shiny application — safe_ggplot • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Safely render a ggplot in Shiny application

    -
    - -
    safe_ggplot(expr, data = NULL, session = shiny::getDefaultReactiveDomain())
    - -

    Arguments

    - - - - - - - - - - - - - - -
    expr

    Code to produce a ggplot object.

    data

    Argument passed to eval_tidy to evaluate expression.

    session

    Session object to send notification to.

    - -

    Value

    - -

    Output of ggplot_build.

    - -

    Examples

    -
    if (interactive()) { - library(shiny) - library(ggplot2) - - ui <- fluidPage( - fluidRow( - column( - width = 3, - selectInput( - inputId = "var", - label = "Var:", - choices = c("Sepal.Width", "Do.Not.Exist") - ) - ), - column( - width = 9, - plotOutput(outputId = "plot") - ) - ) - ) - - server <- function(input, output, session) { - - output$plot <- renderPlot({ - p <- ggplot(iris) + - geom_point(aes_string("Sepal.Length", input$var)) - safe_ggplot(p) - }) - - } - - shinyApp(ui, server) -} -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/save-ggplot-module.html b/docs/reference/save-ggplot-module.html deleted file mode 100644 index 76143ae6..00000000 --- a/docs/reference/save-ggplot-module.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - - -Save ggplot module — save-ggplot-module • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Save a ggplot object in various format and resize it before saving.

    -
    - -
    save_ggplot_ui(
    -  id,
    -  output_format = c("png", "pdf", "svg", "jpeg", "bmp", "eps", "tiff")
    -)
    -
    -save_ggplot_modal(
    -  id,
    -  title = NULL,
    -  output_format = c("png", "pdf", "svg", "jpeg", "bmp", "eps", "tiff")
    -)
    -
    -save_ggplot_server(id, plot_rv)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    id

    Module ID.

    output_format

    Output formats offered to the user.

    title

    Modal's title.

    plot_rv

    A reactiveValues with a slot plot containing a ggplot object.

    - -

    Value

    - -

    No value. Use in UI & server of shiny application.

    - -

    Examples

    -
    library(shiny) -library(ggplot2) -library(esquisse) - - -ui <- fluidPage( - tags$h2("Save a ggplot"), - selectInput("var", "Variable:", names(economics)[-1]), - plotOutput("plot", width = "600px"), - actionButton("save", "Save this plot") -) - -server <- function(input, output, session) { - - rv <- reactiveValues(plot = NULL) - - output$plot <- renderPlot({ - rv$plot <- ggplot(economics) + - geom_line(aes(date, !!sym(input$var))) + - theme_minimal() - rv$plot - }) - - observeEvent(input$save, { - save_ggplot_modal("ID", "Save plot") - }) - save_ggplot_server("ID", rv) -} - -if (interactive()) - shinyApp(ui, server) -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/updateDragulaInput.html b/docs/reference/updateDragulaInput.html deleted file mode 100644 index db53544b..00000000 --- a/docs/reference/updateDragulaInput.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - -Update Dragula Input — updateDragulaInput • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Update Dragula Input

    -
    - -
    updateDragulaInput(
    -  session,
    -  inputId,
    -  choices = NULL,
    -  choiceNames = NULL,
    -  choiceValues = NULL,
    -  selected = NULL,
    -  selectedNames = NULL,
    -  selectedValues = NULL,
    -  badge = TRUE,
    -  status = "primary"
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    session

    The session object passed to function given to shinyServer.

    inputId

    The id of the input object.

    choices

    List of values to select from (if elements of the list are -named then that name rather than the value is displayed to the user). -If this argument is provided, then choiceNames and choiceValues must -not be provided, and vice-versa. The values should be strings; other -types (such as logicals and numbers) will be coerced to strings.

    choiceNames, choiceValues

    List of names and values, respectively, -that are displayed to the user in the app and correspond to the each -choice (for this reason, choiceNames and choiceValues must have the same length). -If either of these arguments is provided, then the other must be provided and -choices must not be provided. The advantage of using both of these over a named -list for choices is that choiceNames allows any type of UI object to be passed -through (tag objects, icons, HTML code, ...), instead of just simple text.

    selected

    A list with targetIds as names to select values.

    selectedNames, selectedValues

    Update selected items with custom names and values.

    badge

    Displays choices inside a Bootstrap badge.

    status

    If choices are displayed into a Bootstrap badge, you can use Bootstrap -status to color them, or NULL.

    - - -

    Examples

    -
    -if (interactive()) { - -library("shiny") -library("esquisse") - -ui <- fluidPage( - tags$h2("Update dragulaInput"), - radioButtons( - inputId = "update", - label = "Dataset", - choices = c("iris", "mtcars") - ), - tags$br(), - dragulaInput( - inputId = "myDad", - sourceLabel = "Variables", - targetsLabels = c("X", "Y", "fill", "color", "size"), - choices = names(iris), - replace = TRUE, width = "400px", status = "success" - ), - verbatimTextOutput(outputId = "result") -) - -server <- function(input, output, session) { - - output$result <- renderPrint(str(input$myDad)) - - observeEvent(input$update, { - if (input$update == "iris") { - updateDragulaInput( - session = session, - inputId = "myDad", - choices = names(iris), - status = "success" - ) - } else { - updateDragulaInput( - session = session, - inputId = "myDad", - choices = names(mtcars) - ) - } - }, ignoreInit = TRUE) - -} - -shinyApp(ui, server) - -} - -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/updateDropInput.html b/docs/reference/updateDropInput.html deleted file mode 100644 index 4f5ecf4c..00000000 --- a/docs/reference/updateDropInput.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - - -Change the value of a drop input on the client — updateDropInput • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Change the value of a drop input on the client

    -
    - -
    updateDropInput(session, inputId, selected = NULL, disabled = NULL)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    session

    The session object passed to function given to shinyServer.

    inputId

    The id of the input object.

    selected

    The initially selected value.

    disabled

    Choices (choicesValues) to disable.

    - -

    See also

    - - - -

    Examples

    -
    if (interactive()) { - - library(shiny) - library(esquisse) - - myChoices <- tagList( - list(icon("home"), style = "width: 100px;"), - list(icon("flash"), style = "width: 100px;"), - list(icon("cogs"), style = "width: 100px;"), - list(icon("fire"), style = "width: 100px;"), - list(icon("users"), style = "width: 100px;"), - list(icon("info"), style = "width: 100px;") - ) - - - ui <- fluidPage( - tags$h2("Update Drop Input"), - fluidRow( - column( - width = 6, - dropInput( - inputId = "mydrop", - choicesNames = myChoices, - choicesValues = c("home", "flash", "cogs", "fire", "users", "info"), - dropWidth = "220px" - ), - verbatimTextOutput(outputId = "res") - ), - column( - width = 6, - actionButton("home", "Select home"), - actionButton("flash", "Select flash"), - actionButton("cogs", "Select cogs"), - actionButton("fire", "Select fire"), - actionButton("users", "Select users"), - actionButton("info", "Select info"), - checkboxGroupInput( - inputId = "disabled", - label = "Choices to disable", - choices = c("home", "flash", "cogs", "fire", "users", "info") - ), - actionButton("disable", "Disable") - ) - ) - ) - - server <- function(input, output, session) { - - output$res <- renderPrint({ - input$mydrop - }) - - observeEvent(input$home, { - updateDropInput(session, "mydrop", "home") - }) - observeEvent(input$flash, { - updateDropInput(session, "mydrop", "flash") - }) - observeEvent(input$cogs, { - updateDropInput(session, "mydrop", "cogs") - }) - observeEvent(input$fire, { - updateDropInput(session, "mydrop", "fire") - }) - observeEvent(input$users, { - updateDropInput(session, "mydrop", "users") - }) - observeEvent(input$info, { - updateDropInput(session, "mydrop", "info") - }) - - observeEvent(input$disable, { - if (!is.null(input$disabled)) { - updateDropInput(session, "mydrop", disabled = input$disabled) - } else { - updateDropInput(session, "mydrop", disabled = character(0)) - } - }) - } - - shinyApp(ui, server) - -} -
    -
    - -
    - - - -
    - - - - - - - - diff --git a/docs/reference/which_pal_scale.html b/docs/reference/which_pal_scale.html deleted file mode 100644 index d14e2e08..00000000 --- a/docs/reference/which_pal_scale.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - -Automatically select appropriate color scale — which_pal_scale • esquisse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Automatically select appropriate color scale

    -
    - -
    which_pal_scale(
    -  mapping,
    -  palette = "ggplot2",
    -  data = NULL,
    -  fill_type = c("continuous", "discrete"),
    -  color_type = c("continuous", "discrete"),
    -  reverse = FALSE
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - -
    mapping

    Aesthetics used in ggplot.

    palette

    Color palette.

    data

    An optional data.frame to choose the right type for variables.

    fill_type, color_type

    Scale to use according to the variable used -in fill/color aesthetic : "discrete" or "continuous". -Ignored if data is provided: it will be guessed from data.

    reverse

    Reverse colors order or not.

    - -

    Value

    - -

    a list

    - -

    Examples

    -
    library(ggplot2) - -# Automatic guess according to data -which_pal_scale( - mapping = aes(fill = Sepal.Length), - palette = "ggplot2", - data = iris -) -
    #> $scales -#> [1] "scale_fill_gradient" -#> -#> $args -#> list() -#>
    which_pal_scale( - mapping = aes(fill = Species), - palette = "ggplot2", - data = iris -) -
    #> $scales -#> [1] "scale_fill_hue" -#> -#> $args -#> $args$scale_fill_hue -#> $args$scale_fill_hue$direction -#> [1] 1 -#> -#> -#>
    - -# Explicitly specify type -which_pal_scale( - mapping = aes(color = variable), - palette = "Blues", - color_type = "discrete" -) -
    #> $scales -#> [1] "scale_color_brewer" -#> -#> $args -#> $args$scale_color_brewer -#> $args$scale_color_brewer$palette -#> [1] "Blues" -#> -#> $args$scale_color_brewer$direction -#> [1] 1 -#> -#> -#>
    - -# Both scales -which_pal_scale( - mapping = aes(color = var1, fill = var2), - palette = "Blues", - color_type = "discrete", - fill_type = "continuous" -) -
    #> $scales -#> [1] "scale_fill_distiller" "scale_color_brewer" -#> -#> $args -#> $args$scale_fill_distiller -#> $args$scale_fill_distiller$palette -#> [1] "Blues" -#> -#> $args$scale_fill_distiller$direction -#> [1] 1 -#> -#> -#> $args$scale_color_brewer -#> $args$scale_color_brewer$palette -#> [1] "Blues" -#> -#> $args$scale_color_brewer$direction -#> [1] 1 -#> -#> -#>
    -
    - -
    - - - -
    - - - - - - - -