Barret Schloerke
Resources tagged Barret Schloerke#
Getting Started with {shinytest2} Part I || Example + basics || RStudio
00:00 Introduction 00:48 Overview of the demo Shiny app 03:00 Running record_test() 04:44 Results from record_test() 07:18 A note on .png files created during testing 08:52 Debugging with shinytest2 09:32 Using app$view() to open a visual representation of a headless browser
Part 2 - Exporting values: https://youtu.be/7KLv6HdIxvU Part 3 - Using shiny.testmode: https://youtu.be/xDxa_mDwN04
Manually testing Shiny applications is often laborious, inconsistent, and doesn’t scale well. Whether you are developing new features, fixing bug(s), or simply upgrading dependencies on a serious app where mistakes have real consequences, it is critical to know when regressions are introduced. shinytest2 provides a streamlined toolkit for unit testing Shiny applications and seamlessly integrates with the popular testthat framework for unit testing R code.
shinytest2 uses chromote to render applications in a headless Chrome browser. chromote allows for a live preview, better debugging tools, and/or simply using modern JavaScript/CSS.
By simply recording your actions as code and extending them to test the more particular aspects of your application, it will result in fewer bugs and more confidence in future Shiny application development.
Read up on shinytest2 here: https://rstudio.github.io/shinytest2/
Learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) Motion design and editing: Jesse Mostipak (@kierisi)
Theme song: Brad PKL by Blue Dot Sessions (https://app.sessions.blue/browse/track/113507 )

Getting Started with {shinytest2} Part 3 || Using shiny.testmode in {shinytest2} || RStudio
00:00 Introduction 00:15 Testing production apps
Part 1 - Getting started: https://youtu.be/SS1Na3c8lhk Part 2 - Exporting values: https://youtu.be/7KLv6HdIxvU
Manually testing Shiny applications is often laborious, inconsistent, and doesn’t scale well. Whether you are developing new features, fixing bug(s), or simply upgrading dependencies on a serious app where mistakes have real consequences, it is critical to know when regressions are introduced. shinytest2 provides a streamlined toolkit for unit testing Shiny applications and seamlessly integrates with the popular testthat framework for unit testing R code.
shinytest2 uses chromote to render applications in a headless Chrome browser. chromote allows for a live preview, better debugging tools, and/or simply using modern JavaScript/CSS.
By simply recording your actions as code and extending them to test the more particular aspects of your application, it will result in fewer bugs and more confidence in future Shiny application development.
Read up on shinytest2 here: https://rstudio.github.io/shinytest2/
Learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) Motion design and editing: Jesse Mostipak (@kierisi)
Theme song: Brad PKL by Blue Dot Sessions (https://app.sessions.blue/browse/track/113507 )

Getting Started with {shinytest2} Part 2 || Exporting values || RStudio
00:00 Introduction 00:29 Exporting reactives 03:28 Using exportTestValues()
Part 1 - Getting started: https://youtu.be/SS1Na3c8lhk Part 3 - Using shiny.testmode: https://youtu.be/xDxa_mDwN04
Manually testing Shiny applications is often laborious, inconsistent, and doesn’t scale well. Whether you are developing new features, fixing bug(s), or simply upgrading dependencies on a serious app where mistakes have real consequences, it is critical to know when regressions are introduced. shinytest2 provides a streamlined toolkit for unit testing Shiny applications and seamlessly integrates with the popular testthat framework for unit testing R code.
shinytest2 uses chromote to render applications in a headless Chrome browser. chromote allows for a live preview, better debugging tools, and/or simply using modern JavaScript/CSS.
By simply recording your actions as code and extending them to test the more particular aspects of your application, it will result in fewer bugs and more confidence in future Shiny application development.
Read up on shinytest2 here: https://rstudio.github.io/shinytest2/
Learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) Motion design and editing: Jesse Mostipak (@kierisi)
Theme song: Brad PKL by Blue Dot Sessions (https://app.sessions.blue/browse/track/113507 )

Programming Games with Shiny || Roll the Dice: with Quosures! || RStudio
00:00 Introduction
03:44 The pain of copy + paste
07:28 Going on a helper function adventure!
18:09 Ready for rlang
28:17 !! + enquo()
37:57 Benefits of the rlang approach
38:46 Embracing the embrace operator
41:33 Visualizing what’s happening using reactlog
You’ve most likely used Shiny to build a web app that displays data, but you can also use Shiny to build games! In this video series, Jesse and Barret pair program simply games in Shiny as a way to uncover and explore new features.
Read up on the embrace operator here: https://rlang.r-lib.org/reference/embrace-operator.html
Learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) and Jesse Mostipak (@kierisi) Animation, motion design, and editing: Jesse Mostipak (@kierisi)
Theme song: Hakodate Line by Blue Dot Sessions (https://app.sessions.blue/browse/track/111291" )

Programming Games with Shiny || Roll the Dice || RStudio
00:00 Introduction 01:40 Rolling with eventReactive( ) 06:26 Reducing eventReactive( ) to reactive( ) + isolate( ) 16:23 Combining reactive( ) and bindEvent( ) 20:11 Reviewing our reactives 21:23 Writing a function to de-duplicate dice rolls
You’ve most likely used Shiny to build a web app that displays data, but you can also use Shiny to build games! In this video series, Jesse and Barret pair program simply games in Shiny as a way to uncover and explore new features.
Read up on tabset panels here: https://shiny.rstudio.com/reference/shiny/0.14/tabsetPanel.html
Learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) and Jesse Mostipak (@kierisi) Animation, motion design, and editing: Jesse Mostipak (@kierisi)
Theme song: Hakodate Line by Blue Dot Sessions (https://app.sessions.blue/browse/track/111291" )

Programming Games with Shiny || Guess the Number || RStudio
00:00 Introduction 00:35 Setting up our app UI 06:19 Using observeEvent() 10:02 Writing an if else statement as part of our feedback mechanism 13:40 Testing our app and deciding which bugs to fix first 14:20 Check yourself before you req() yourself 17:10 Using tabset panels to control what the user sees
You’ve most likely used Shiny to build a web app that displays data, but you can also use Shiny to build games! In this video series, Jesse and Barret pair program simply games in Shiny as a way to uncover and explore new features.
Read up on tabset panels here: https://shiny.rstudio.com/reference/shiny/1.5.0/tabsetPanel.html
Learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) and Jesse Mostipak (@kierisi) Animation, motion design, and editing: Jesse Mostipak (@kierisi)
Theme song: Hakodate Line by Blue Dot Sessions (https://app.sessions.blue/browse/track/91291 )

Programming Games with Shiny || Dragon Realm || RStudio
00:00 Introduction 00:05 Fun dragon facts 00:35 Describing the Dragon Realm game 01:20 Outlining our approach 04:38 Coding the basics of our app 10:15 Programming our action buttons 14:10 A note on coding objects “outside” of Shiny 15:27 Programming cave choice logic 20:29 Connecting action buttons to our consequences function 29:40 Creating separate pages using tabsetPanel() 39:35 Conclusion
You’ve most likely used Shiny to build a web app that displays data, but you can also use Shiny to build games! In this video series, Jesse and Barret pair program simply games in Shiny as a way to uncover and explore new features.
And because we know you’ll ask, Jesse is using the Woodland theme from the base16 palette. You can get it - and other themes - from the {rsthemes} package: https://github.com/gadenbuie/rsthemes
Read up on tabset panels here: https://shiny.rstudio.com/reference/shiny/1.5.0/tabsetPanel.html
Learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) and Jesse Mostipak (@kierisi) Animation, motion design, and editing: Jesse Mostipak (@kierisi)
Intro music: RGift by Blue Dot Sessions (https://app.sessions.blue/browse/track/91282 ) Theme song: Hakodate Line by Blue Dot Sessions (https://app.sessions.blue/browse/track/91291 )

Barret Schloerke || Maximize computing resources using future_promise() || RStudio
00:00 Introduction 01:45 Setting up a multisession using the future package 02:05 Simulation using two workers 04:14 Simulation using 10 workers 05:20 What happens when we run out of workers? 05:35 How Shiny handles future processes like promises 07:16 Introduction to future_promise() 07:45 Demo of the promises package 09:21 Setting the number of workers 10:40 Demo of processing without future_promise() 14:11 Wrapping a slow calculation in a future() 14:53 Demo of processing using Plumber 16:25 Considerations on the number of cores to use 17:21 What happens if we run out of workers? 19:44 Decrease in execution times using future_promise()
In an ideal situation, the number of available future workers (future::nbrOfFreeWorkers()) is always more than the number of future::future() jobs. However, if a future job is attempted when the number of free workers is 0, then future will block the current R session until one becomes available.
The advantage of using future_promise() over future::future() is that even if there aren’t future workers available, the future is scheduled to be done when workers become available via promises. In other words, future_promise() ensures the main R thread isn’t blocked when a future job is requested and can’t immediately perform the work (i.e., the number of jobs exceeds the number of workers).
You can read more about the promises package here: https://rstudio.github.io/promises/articles/shiny.html And you can learn more about Shiny here: https://shiny.rstudio.com/
Got questions? The RStudio Community site is a great place to get assistance: https://community.rstudio.com/
Content: Barret Schloerke (@schloerke) Design and editing: Jesse Mostipak (@kierisi)

Barret Schloerke | Reactlog 2.0 Debugging the state of Shiny | RStudio (2019)
The revamped reactlog provides an updated visual display to traverse through the reactive behavior within your shiny application. Using live shiny applications, we will use reactlog’s directed dependency graph to find missing reactive dependencies in “working” applications and address suboptimal reactive coding patterns. Correcting these coding patterns will reduce the amount of calculations done by shiny and keep reactive objects from being created unnecessarily.
VIEW MATERIALS http://github.com/schloerke/presentation-2019-01-18-reactlog
About the Author Barret Schloerke I specialize in Large Data Visualization where I utilize the interactivity of a web browser, the fast iterations of the R programming language, and large data storage capacity of Hadoop
