Mike Nguyen
Mike Nguyen
About
Projects
Posts
Teaching
Talks
Data
Contact
CV
Books
Written Books
Recommended Books
Light
Dark
Automatic
Posts
Fold code in bookdown
Following this answer by Sébastien Rochette, we can fold all code chunk in bookdown by Create a js folder in the same directory as your bookdown book Create 3 files in this js folder transition.
Last updated on Nov 21, 2021
9 min read
R
Experimentation at Scale
Tools that can help you create experiments at scale: Empirica (recommend) nodegame otree: Python-based Lioness Lab BreadBoard: network Turktool: survey for Amazon Mturk Jspsych: JavaScript-based PsiTurk: Survey for Amazon Mturk
Last updated on Oct 14, 2021
1 min read
Data
Create your own hexagon in R
This is a super fast and easy way to create your first hexagon in R. Enjoy !!! # install.packages("hexSticker") library(hexSticker) ## Warning: package 'hexSticker' was built under R version 4.
Last updated on Aug 16, 2021
1 min read
R
How to add cover image to bookdown
<div style = "text-align: center"> ![](cover.jpg) </div> Alternatively, you can also use r block knitr::include_graphics('cover.jpg', dpi = NA)
Last updated on Aug 16, 2021
1 min read
R
Bookdown Statistics
It’s possible to have basic statistics from bookdown using connectapi (basic example). However, this feature is very limited. Hence, it is better to connect bookdown to Google Analytics to have better metrics.
Last updated on Aug 15, 2021
1 min read
R
How to connect bookdown with google analytics
Create Google Analytics account Choose “Analytics Accounts” Create “Properties & Apps” In “Data Streams”, “Add stream” with your website URL Under “Tagging Instructions”, click on gtag.js. You should see something like this: <!
Last updated on Aug 14, 2021
1 min read
R
Template for Shiny
New Template to get you produce cool Shiny App instantly flexdashboard install.packages("flexdashboard") library(flexdashboard)
Last updated on Apr 29, 2021
1 min read
R
CSS and SASS in Shiny
CSS = Cascading Style Sheets Selector Declaration To add CSS to Shiny: Add styling to tags Add CSS to HTML header Add style sheets with the www directory (most ideal) SASS = Systematically Awesome Style Sheets (built on top of CSS)
Last updated on Apr 4, 2021
1 min read
R
reproducible example (reprex)
install once per computer install.packages("reprex") or part of `tidyverse install.packages("tidyverse") You can either call it in every session library(reprex) or put it in .Rprofile for each machine to run whenever you open R
Last updated on Apr 3, 2021
1 min read
R
Scaling Shiny
To solve the problem of scaling: From DevOps/IT: Add memory, CPU Rstudio Connect set up for multiple machines From R/Shiny engineer: use Javascript for less CPU usage extract computations: Shiny worker, Plumber use a database
Last updated on Apr 2, 2021
1 min read
R
,
Data
«
»
Cite
×