• Stars
    star
    115
  • Rank 295,411 (Top 6 %)
  • Language
    R
  • License
    Other
  • Created over 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lorem-Ipsum-like Helpers for fast Shiny Prototyping

R build status Codecov test coverage R-CMD-check

shinipsum

The goal of {shinipsum}is to provide random shiny elements for easiest shiny app prototyping, so that you can focus on building the frontend before building the backend.

The full documentation can be found on the {pkgdown}site: https://thinkr-open.github.io/shinipsum/

Installation

You can install the dev version of shinipsum from GitHub with:

install.packages("shinipsum")

About

You’re reading the doc about version : 0.0.0.9000

This README has been compiled on the

Sys.time()
#> [1] "2023-03-27 11:19:38 CEST"

Here are the test & coverage results :

devtools::check(quiet = TRUE)
#> ══ Documenting ═════════════════════════════════════════════════════════════════
#> β„Ή Installed roxygen2 version (7.2.3) doesn't match required (7.1.1)
#> βœ– `check()` will not re-document this package
#> ── R CMD check results ─────────────────────────────── shinipsum 0.0.0.9000 ────
#> Duration: 18.4s
#> 
#> ❯ checking top-level files ... NOTE
#>   Non-standard file/directory found at top level:
#>     β€˜README.html’
#> 
#> ❯ checking dependencies in R code ... NOTE
#>   Namespace in Imports field not imported from: β€˜utils’
#>     All declared Imports should be used.
#> 
#> 0 errors βœ” | 0 warnings βœ” | 2 notes βœ–
covr::package_coverage()
#> shinipsum Coverage: 97.91%
#> R/example.R: 44.44%
#> R/Table.R: 96.97%
#> R/Plot.R: 99.29%
#> R/DataTable.R: 100.00%
#> R/dygraphs.R: 100.00%
#> R/Image.R: 100.00%
#> R/LinearModel.R: 100.00%
#> R/Print.R: 100.00%
#> R/Text.R: 100.00%
#> R/utils.R: 100.00%

Demo

Available examples:

library(shinipsum)
ipsum_examples()
#> [1] "01_navbar.R"

You can run {shinipsum} demos with:

shiny::runApp(
  ipsum_examples("01_navbar.R")
)

Available ipsums :

Note: {shinipsum} only load functions which are necessary to its internal job. If you want to customise an output or to use a renderXX / XXOutput, you’ll need to explicitely load the packages needed (for example, if you want to customise a dygraph, a ggplot, or use ggplotly).

DataTable

random_DT takes 4 args :

  • nrow & ncol: number of row and columns of the table
  • type : random, numeric, character, numchar - the type of the columns
  • ... : args to be passed to DT::datatable

Image

random_image returns a random image.

Plot

random_ggplot takes one arg :

  • type : Can be any of β€œrandom”, β€œpoint”, β€œbar”, β€œboxplot”,β€œcol”, β€œtile”, β€œline”, β€œbin2d”, β€œcontour”, β€œdensity”, β€œdensity_2d”, β€œdotplot”, β€œhex”, β€œfreqpoly”, β€œhistogram”, β€œribbon”, β€œraster”, β€œtile”, β€œviolin” and defines the geom of the ggplot. Default is β€œrandom”, and chooses a random geom for you.

Default theme is minimal.

As the return object is a ggplot, it can be enhanced like any other ggplot with +.

library(ggplot2)
random_ggplot(type = "col") +
  labs(title = "Random plot") +
  theme_bw()

random_ggplotly calls the ggplotly function on a random_ggplot.

Dygraph

random_dygraph returns a random dygprah. It takes one arg:

  • ...: arguments which are passed to the dygraph() function.

As the return object is a dygraph, it can be enhanced like any other dygraph.

library(dygraphs)
random_dygraph()  %>%
  dyRangeSelector()

Print

random_print takes one arg:

  • type: can be any of "character", "numeric", "model", "table", and defines the type of print. Default is "character".

Table

random_table takes three args : nrow, ncols and type. See random_DT.

Text

random_text takes one of these two args:

  • nchar: lorem ipsum of nchar characters
  • nwords: lorem ipsum of nwords characters
  • offset: number of characters or words to offset the result by

Lm

random_lm returns a random lm model output:

  • nobs: Number of observations
  • nx: Number of variables (should be lower than nobs)

Example

Here is an example of using {shinipsum} to generate a random app:

library(shiny)
library(shinipsum)
library(DT)
ui <- fluidPage(
  h2("A Random DT"),
  DTOutput("data_table"),
  h2("A Random Image"),
  plotOutput("image", height = "300px"),
  h2("A Random Plot"),
  plotOutput("plot"),
  h2("A Random Print"),
  verbatimTextOutput("print"),
  h2("A Random Table"),
  tableOutput("table"),
  h2("A Random Text"),
  tableOutput("text")
)

server <- function(input, output, session) {
  output$data_table <- DT::renderDT({
    random_DT(10, 5)
  })
  output$image <- renderImage({
    random_image()
  })
  output$plot <- renderPlot({
    random_ggplot()
  })
  output$print <- renderPrint({
    random_print("model")
  })
  output$table <- renderTable({
    random_table(10, 5)
  })
  output$text <- renderText({
    random_text(nwords = 50)
  })
}
shinyApp(ui, server)

Please note that the β€˜shinipsum’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

More Repositories

1

golem

A Framework for Building Robust Shiny Apps
R
868
star
2

remedy

RStudio Addins to Simplify Markdown Writing
R
448
star
3

companies-using-r

A Curated list of R uses in entreprise
247
star
4

prepare-for-cran

A Collaborative list of things to know before submitting to CRAN
232
star
5

engineering-shiny-book

Engineering Production-Grade Shiny Apps β€” Published in the R Series
TeX
217
star
6

dockerfiler

Easy Dockerfile Creation from R
R
159
star
7

fusen

Inflate your package from a simple flat Rmd
R
148
star
8

fakir

Create Fake Data in R for tutorials
R
128
star
9

attachment

Tools to deal with dependencies in scripts, Rmd and packages
R
104
star
10

shinysnippets

A series of shiny related RStudio Snippets
R
101
star
11

fcuk

A R package designed to help people with clumsy fingers.
R
89
star
12

wedding

Shiny app with custom css to prepare and manage a wedding
R
51
star
13

togglr

an R and Rstudio wrapper for toggl Api
R
46
star
14

devindocker

Development in a Docker container
R
37
star
15

gitlabr

An R client for the GitLab API
R
37
star
16

mariobox

A Framework For Packaging {plumber} APIs
R
37
star
17

seven31

R πŸ“¦ for R FAQ 7.31
R
36
star
18

checkhelper

A package to help deal with devtools::check outputs
R
34
star
19

gitdown

Document each modification of your software by turning your git commits into a gitbook
R
34
star
20

littleboxes

Rstudio Addin - create boxed title in an Rscript
R
33
star
21

licensing-r

A Bookdown about R & licenses
HTML
32
star
22

thinkr

Some tools for cleaning up messy 'Excel' files to be suitable for R
R
29
star
23

prompt

Dynamic prompt
R
28
star
24

testdown

Turn your 'testthat' results into a Bookdown.
R
26
star
25

prenoms

French Baby Names 1900-2020
R
23
star
26

ztype

How fast can you type R functions on your keyboard ?
R
23
star
27

tagsinput

Bootstrap tags input for shiny
R
20
star
28

tweetstorm

tweetstorm
R
19
star
29

utf8splain

Explain utf-8 encoded strings
R
18
star
30

js4shinyfieldnotes

Field Notes on JavaScript for Shiny Users
HTML
13
star
31

brighter

A toolbox of functions for easier shiny development.
R
12
star
32

who

Data from the World Health Organisation
R
12
star
33

rtodoist

Package to call the todoist API. Manage your ToDo lists with todoist from R.
R
11
star
34

papillon

Build And Highlight Package Documentation With Customized Templates
R
11
star
35

isc-proposal

RConsortium ISC Proposal β€” "Rebooting and Extending R for Neo4J"
9
star
36

bank

Alternative caching backends for `{memoise}` & `{shiny}`.
R
9
star
37

stopwords

stop words in several languages
R
9
star
38

prenomsapp

A Web App for French Baby Names
R
8
star
39

uni

unicode tibble
R
8
star
40

timer

A dead simple timer page written in JavaScript
TypeScript
8
star
41

shinidraw

R
7
star
42

arpr

Advanced R Pipes
R
7
star
43

datasets

Various datasets, free to use
R
6
star
44

elvis

'Shiny' renderers and observers made safer
R
6
star
45

spongecake

Transform a Movie into a Synthetic Picture.
R
6
star
46

golem-workshop

Repo for the Golem Workshop during ThinkR & RStudio Roadshow 2019
6
star
47

purrple

some html widgets
JavaScript
6
star
48

inca3

Jeux de donnΓ©es issu de l’étude de consommation alimentaire des franΓ§ais inca3 de l'ANSES
R
5
star
49

ghooks

'Golem' Hooks for Standard 'Shiny' Apps
R
5
star
50

rusk

Multiplication Tables On a Modular Circle
R
5
star
51

isc-proposal-licence

Licensing R - Guidelines and tools
5
star
52

prague

Where golems come to life
R
5
star
53

shinytodocx

POC permettant de montrer comment construire un rapport .docx Γ  partir d 'une application shiny
HTML
4
star
54

legislatives2017

RΓ©sultat des elections legislatives 2017
R
4
star
55

mongooser

A port of MongooseJS to R
R
4
star
56

signature

πŸ–ŠοΈ Fill in your email signature from a template
R
4
star
57

lozen

The objective of {lozen} is to centralize project management tools for Devs and Lead Devs.
R
4
star
58

tutor

R
4
star
59

thinkrdashboard

State of ThinkR open-source projects
R
4
star
60

w3css

[WIP] Implementation of W3.CSS for {shiny}
R
4
star
61

googlefonts

using google fonts in shiny applications
R
3
star
62

clientapp

Showcase of Shiny App for client database and after-sales calls exploration
R
3
star
63

installR

script d'installation de configuration de R
R
3
star
64

rstudioconf2019

An e-poster given during the rstudio::conf(2019).
3
star
65

docker4dev

Repository with DockerFiles for tutorials
R
2
star
66

architekter

A tool to extract a {ggplot2} theme from a Figma file
R
2
star
67

golemverse.org

golemverse
JavaScript
2
star
68

golemstream

Streams by the {golem} team
HTML
2
star
69

bookshiny

R
2
star
70

ipsum

dummy text generator
R
2
star
71

fa

font awesome R tools
R
2
star
72

gemstones

Make Your 'golem' App Shine
R
2
star
73

rfrance

Aggregation de blog sur #rstats en πŸ‡«πŸ‡·
CSS
2
star
74

activecollabr

Access the active collab API from R.
R
2
star
75

abcdR

1
star
76

thinkr-hex-stickers

HQ hex and visuals for ThinkR projects
1
star
77

thinkrtemplate

A pkgdown template for ThinkR packages
CSS
1
star
78

axonaut

axonaut API for R
R
1
star
79

golem-paper

Repo for a paper about golem
1
star
80

cranology

R
1
star
81

tetraclasse

Satisfaction analysis - LLosa matrix - Tetraclasse model
R
1
star
82

emojitsu

Emoji Grammar
R
1
star
83

example.auto

Repository for automatic repo management tests
R
1
star
84

thinkr-open.r-universe.dev

Packages for the ThinkR Universe
1
star
85

quakr

🌈 Quakr formats for revealjs
SCSS
1
star
86

blogs-comments

Comments on our blog posts with Utterances
1
star
87

iframe.illustrations

Some iframe for our blog posts on thinkr.fr
HTML
1
star
88

slack

slack API for R
R
1
star
89

meetup-r

Meetup "R, vous avez dit R ?"
1
star