Skip to content

Commit

Permalink
Kable print tabular outputs from probability folder. Not shown prior.
Browse files Browse the repository at this point in the history
  • Loading branch information
FanWangEcon committed Jun 19, 2020
1 parent 23db649 commit ecea82e
Show file tree
Hide file tree
Showing 90 changed files with 4,621 additions and 1,181 deletions.
6 changes: 6 additions & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# rm(list = ls(all.names = TRUE))
# Load Libraries
library(tidyverse)
library(tidyr)
library(forcats)
library(knitr)
library(kableExtra)
library(REconTools)

# formatR needed for tidy.opts below
library(formatR)

# jointly use R and Python Together
Expand Down
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
*.ipynb linguist-vendored
*.csv linguist-vendored
*.xlsx linguist-vendored
*.tex linguist-vendored
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
###################

*.Rhistory
*.ipynb

###################
# Jupyter Ignore
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Please contact [FanWangEcon](https://fanwangecon.github.io/) for issues or probl
2. [Examples of Sample Space and Probabilities](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespaceexa.html): [**rmd**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability//samplespaceexa.Rmd) \| [**r**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespaceexa.R) \| [**pdf**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespaceexa.pdf) \| [**html**](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespaceexa.html)
+ Throwing a quarter, four candidates for election, six-sided unfair dice, two basketball games
+ **r**: *sample(size, replace, prob)*
3. [Throw an Unfair Four Sided Dice](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html): [**rmd**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability//samplespacedice.Rmd) \| [**r**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.R) \| [**pdf**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.pdf) \| [**html**](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html)
3. [Law of Large Number Unfair Dice](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html): [**rmd**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability//samplespacedice.Rmd) \| [**r**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.R) \| [**pdf**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.pdf) \| [**html**](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html)
+ Throw an unfair dice many times, law of large number.
+ **r**: *head() + tail() + factor() + sample() + as.numeric() + paste0('dice=', var) + sprintf('%0.3f', 1.1234) + sprintf("P(S=1)=%0.3f, P(S=2)=%0.3f", 1.1, 1.2345)*
+ **stringr**: *str_extract() + as.numeric(str_extract(variable, "[^.n]+$")))*
Expand Down Expand Up @@ -93,3 +93,4 @@ Please contact [![](https://img.shields.io/github/followers/fanwangecon?label=Fa
![Language](https://img.shields.io/github/languages/top/fanwangecon/R4Econ)
![Release](https://img.shields.io/github/downloads/fanwangecon/R4Econ/total)
![License](https://img.shields.io/github/license/fanwangecon/R4Econ)

2 changes: 1 addition & 1 deletion README_appendix.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
2. [Examples of Sample Space and Probabilities](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespaceexa.html): [**rmd**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability//samplespaceexa.Rmd) \| [**r**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespaceexa.R) \| [**pdf**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespaceexa.pdf) \| [**html**](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespaceexa.html)
+ Throwing a quarter, four candidates for election, six-sided unfair dice, two basketball games
+ **r**: *sample(size, replace, prob)*
3. [Throw an Unfair Four Sided Dice](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html): [**rmd**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability//samplespacedice.Rmd) \| [**r**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.R) \| [**pdf**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.pdf) \| [**html**](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html)
3. [Law of Large Number Unfair Dice](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html): [**rmd**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability//samplespacedice.Rmd) \| [**r**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.R) \| [**pdf**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.pdf) \| [**html**](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html)
+ Throw an unfair dice many times, law of large number.
+ **r**: *head() + tail() + factor() + sample() + as.numeric() + paste0('dice=', var) + sprintf('%0.3f', 1.1234) + sprintf("P(S=1)=%0.3f, P(S=2)=%0.3f", 1.1, 1.2345)*
+ **stringr**: *str_extract() + as.numeric(str_extract(variable, "[^.n]+$")))*
Expand Down
2 changes: 1 addition & 1 deletion README_toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
2. [Examples of Sample Space and Probabilities](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespaceexa.html): [**rmd**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability//samplespaceexa.Rmd) \| [**r**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespaceexa.R) \| [**pdf**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespaceexa.pdf) \| [**html**](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespaceexa.html)
+ Throwing a quarter, four candidates for election, six-sided unfair dice, two basketball games
+ **r**: *sample(size, replace, prob)*
3. [Throw an Unfair Four Sided Dice](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html): [**rmd**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability//samplespacedice.Rmd) \| [**r**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.R) \| [**pdf**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.pdf) \| [**html**](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html)
3. [Law of Large Number Unfair Dice](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html): [**rmd**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability//samplespacedice.Rmd) \| [**r**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.R) \| [**pdf**](https://github.com/FanWangEcon/Stat4Econ/blob/master/probability/htmlpdfr/samplespacedice.pdf) \| [**html**](https://fanwangecon.github.io/Stat4Econ/probability/htmlpdfr/samplespacedice.html)
+ Throw an unfair dice many times, law of large number.
+ **r**: *head() + tail() + factor() + sample() + as.numeric() + paste0('dice=', var) + sprintf('%0.3f', 1.1234) + sprintf("P(S=1)=%0.3f, P(S=2)=%0.3f", 1.1, 1.2345)*
+ **stringr**: *str_extract() + as.numeric(str_extract(variable, "[^.n]+$")))*
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified bookdown/Introductory-Statistics-with-R-tidyverse.pdf
Binary file not shown.
Loading

0 comments on commit ecea82e

Please sign in to comment.