class: show-only-last-code-result # Random Sampling in R ```r runif(5) ``` ``` ## [1] 0.6603010 0.2128174 0.9295110 0.3853349 0.9406041 ``` -- ```r rnorm(5) ``` ``` ## [1] -1.0955462 -0.6948217 -1.2703253 -0.8511528 -0.8644646 ``` -- ```r rbinom(5, 1, 0.5) ``` ``` ## [1] 1 0 0 0 0 ``` -- ```r rcauchy(5) ``` ``` ## [1] -2.1805304 -0.2111934 -4.0321234 -0.4011822 2.3580361 ``` --- # show-only-last-code-result Use this CSS chunk with the slide `class: show-only-last-code-result`. ```` ```{css echo=FALSE} .show-only-last-code-result pre + pre:not(:last-of-type) code[class="remark-code"] { display: none; } ``` ````