Some Thoughts After Reading <Statistical Rethinking>

Last night, I read the 1st chapter of Statistical Rethinking: A Bayesian Course with Examples in R and Stan from Richard McElreath. I found this is nice book to share with my friends. The core idea of that chapter is the relationship between NULL hypothesis and statistical model. That is, should we trust the statistical models to reject the NULL hypothesis? It is a long history to use statistical models to figure out what is true?

Use R as a bash language

R language could be easily used as a bash script using Rscript *.R. system() is a R base function which could run command line within R. Below is a simple example which allows to automate create a new blog post: (1) Ask users to type in filename, title and language (2) Create a new markdown file in specific directory (i.e. your local posts saved path) (3) Add some metadata in .

Which Country own the most Liberty Nobel Prizes? France? Ireland?

It is of my interest to use ggplot package to visualize some fun data. In this post, I tried to play with a Nobel Prizes Data including countries, prize year, each prize. The goal is to plot a cumulative traceplot of Liberty Nobel Prizes for top 10 countries. Load Packages tidyverse package include some very useful tools such as ggplot2, tidyr and dplyr. library(tidyverse) library(LaCroixColoR) library(ggthemes) library(ggimage) ggimage package was

Make a Game in R

Recently I found a interesting R package call nessy which allows you to create a simple game driven by shiny. Thus. I tried a little bit about this package. Making a interactive app in R is promising in the files like teaching, presentation and visualization. Finally, I created the following shiny app: library(nessy) library(shinyjs) jscode <- "shinyjs.closeWindow = function() { window.close(); }" ui <- cartridge( title = "{Memorize the Names!