knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

esquisse

Try online : https://dreamrs.shinyapps.io/esquisse/

version cranlogs Lifecycle: stable R-CMD-check

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

Use esquisse online : https://dreamrs.shinyapps.io/esquisse/

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 :heart: by @mfanny and cannot be removed, but in the meantime {esquisse} has evolved, the latest version now looks like:

Internationalization

i18n_flag <- function(code, language) {
  code <- strsplit(code, split = "|", fixed = TRUE)[[1]]
  flag <- sprintf("<img src=\"man/figures/i18n/%s.svg\" height=\"16\" style=\"height:16px\"/>", code)
  paste(paste(flag, collapse = ""), language)
}
i18n_flags <- function(languages) {
  mapply(
    FUN = i18n_flag, 
    code = names(languages),
    language = unlist(languages, use.names = FALSE),
    USE.NAMES = FALSE
  )
}
languages <- list(
  gb = "english (default)",
  fr = "french",
  mk = "macedonian",
  "br|pt" = "brazilian portuguese",
  al = "albanian",
  cn = "chinese",
  es = "spanish",
  # de = "german",
  tr = "turkish",
  kr = "korean",
  pl = "polish",
  ja = "japanese",
  de = "german"
)

Currently you can use {esquisse} in the following language: r i18n_flags(languages).

library(esquisse)
set_i18n("fr")
esquisser()

If you want another language to be supported, you can submit a Pull Request to add a CSV file like the one used for french (file is located in inst/i18n folder in the package, you can see it here on GitHub).

See {datamods} vignette for more on this topic.



dreamRs/esquisse documentation built on May 18, 2024, 5:40 p.m.