├── docs ├── CNAME ├── _main.epub ├── _main.pdf ├── libs │ ├── gitbook-2.6.7 │ │ ├── css │ │ │ ├── fontawesome │ │ │ │ └── fontawesome-webfont.ttf │ │ │ ├── plugin-clipboard.css │ │ │ ├── plugin-table.css │ │ │ ├── plugin-search.css │ │ │ ├── plugin-bookdown.css │ │ │ └── plugin-fontsettings.css │ │ └── js │ │ │ ├── plugin-clipboard.js │ │ │ ├── jquery.highlight.js │ │ │ ├── plugin-sharing.js │ │ │ ├── plugin-fontsettings.js │ │ │ ├── plugin-bookdown.js │ │ │ ├── plugin-search.js │ │ │ └── clipboard.min.js │ ├── anchor-sections-1.0.1 │ │ ├── anchor-sections.css │ │ └── anchor-sections.js │ └── header-attrs-2.10 │ │ └── header-attrs.js ├── reference-keys.txt ├── style.css ├── 404.html ├── prerequisites.html ├── index.html ├── search_index.json ├── libraries-and-packages.html └── control-flow.html ├── .gitattributes ├── preamble.tex ├── _bookdown.yml ├── _common.R ├── r-guide.Rproj ├── book.bib ├── README.md ├── .gitignore ├── _output.yml ├── 07-libraries.Rmd ├── style.css ├── 04-control-flow.Rmd ├── 06-lists.Rmd ├── index.Rmd ├── 05-functions.Rmd ├── packages.bib ├── 03-types.Rmd ├── 01-basics.Rmd └── 02-arrays.Rmd /docs/CNAME: -------------------------------------------------------------------------------- 1 | r-guide.steveharoz.com -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /docs/_main.epub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/r-guide/HEAD/docs/_main.epub -------------------------------------------------------------------------------- /docs/_main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/r-guide/HEAD/docs/_main.pdf -------------------------------------------------------------------------------- /preamble.tex: -------------------------------------------------------------------------------- 1 | \usepackage{booktabs} 2 | \usepackage{fontspec} 3 | \setmainfont{Segoe UI} -------------------------------------------------------------------------------- /_bookdown.yml: -------------------------------------------------------------------------------- 1 | delete_merged_file: true 2 | language: 3 | ui: 4 | chapter_name: "Chapter " 5 | output_dir: "docs" 6 | before_chapter_script: "_common.R" -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/r-guide/HEAD/docs/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /_common.R: -------------------------------------------------------------------------------- 1 | set.seed(8675309) 2 | 3 | knitr::opts_chunk$set( 4 | class.output = "code_result", 5 | class.message = c("code_result", "message"), 6 | class.warning = c("code_result", "warning"), 7 | class.error = c("code_result", "error"), 8 | comment = "#>" 9 | ) -------------------------------------------------------------------------------- /r-guide.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | BuildType: Website 16 | -------------------------------------------------------------------------------- /docs/libs/anchor-sections-1.0.1/anchor-sections.css: -------------------------------------------------------------------------------- 1 | /* Styles for section anchors */ 2 | a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;} 3 | a.anchor-section::before {content: '#';} 4 | .hasAnchor:hover a.anchor-section {visibility: visible;} 5 | ul > li > .anchor-section {display: none;} 6 | -------------------------------------------------------------------------------- /book.bib: -------------------------------------------------------------------------------- 1 | @Book{xie2015, 2 | title = {Dynamic Documents with {R} and knitr}, 3 | author = {Yihui Xie}, 4 | publisher = {Chapman and Hall/CRC}, 5 | address = {Boca Raton, Florida}, 6 | year = {2015}, 7 | edition = {2nd}, 8 | note = {ISBN 978-1498716963}, 9 | url = {http://yihui.org/knitr/}, 10 | } 11 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/plugin-clipboard.css: -------------------------------------------------------------------------------- 1 | div.sourceCode { 2 | position: relative; 3 | } 4 | 5 | .copy-to-clipboard-button { 6 | position: absolute; 7 | right: 0; 8 | top: 0; 9 | visibility: hidden; 10 | } 11 | 12 | .copy-to-clipboard-button:focus { 13 | outline: 0; 14 | } 15 | 16 | div.sourceCode:hover > .copy-to-clipboard-button { 17 | visibility: visible; 18 | } 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Welcome! 2 | 3 | This is a minimal example of a book based on R Markdown and **bookdown** (https://github.com/rstudio/bookdown). 4 | 5 | This template provides a skeleton file structure that you can edit to create your book. 6 | 7 | The contents inside the .Rmd files provide some pointers to help you get started, but feel free to also delete the content in each file and start fresh. 8 | 9 | Additional resources: 10 | 11 | The **bookdown** book: https://bookdown.org/yihui/bookdown/ 12 | 13 | The **bookdown** package reference site: https://pkgs.rstudio.com/bookdown 14 | -------------------------------------------------------------------------------- /docs/libs/header-attrs-2.10/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/plugin-table.css: -------------------------------------------------------------------------------- 1 | .book .book-body .page-wrapper .page-inner section.normal table{display:table;width:100%;border-collapse:collapse;border-spacing:0;overflow:auto}.book .book-body .page-wrapper .page-inner section.normal table td,.book .book-body .page-wrapper .page-inner section.normal table th{padding:6px 13px;border:1px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal table tr{background-color:#fff;border-top:1px solid #ccc}.book .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n){background-color:#f8f8f8}.book .book-body .page-wrapper .page-inner section.normal table th{font-weight:700} 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # History files 2 | .Rhistory 3 | .Rapp.history 4 | 5 | # Session Data files 6 | .RData 7 | 8 | # Example code in package build process 9 | *-Ex.R 10 | 11 | # Output files from R CMD build 12 | /*.tar.gz 13 | 14 | # Output files from R CMD check 15 | /*.Rcheck/ 16 | 17 | # RStudio files 18 | .Rproj.user/ 19 | 20 | # produced vignettes 21 | vignettes/*.html 22 | vignettes/*.pdf 23 | 24 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 25 | .httr-oauth 26 | 27 | # knitr and R markdown default cache directories 28 | /*_cache/ 29 | /cache/ 30 | 31 | # Temporary files created by R markdown 32 | *.utf8.md 33 | *.knit.md 34 | 35 | # Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html 36 | rsconnect/ 37 | -------------------------------------------------------------------------------- /docs/libs/gitbook-2.6.7/css/plugin-search.css: -------------------------------------------------------------------------------- 1 | .book .book-summary .book-search { 2 | padding: 6px; 3 | background: transparent; 4 | position: absolute; 5 | top: -50px; 6 | left: 0px; 7 | right: 0px; 8 | transition: top 0.5s ease; 9 | } 10 | .book .book-summary .book-search input, 11 | .book .book-summary .book-search input:focus, 12 | .book .book-summary .book-search input:hover { 13 | width: 100%; 14 | background: transparent; 15 | border: 1px solid #ccc; 16 | box-shadow: none; 17 | outline: none; 18 | line-height: 22px; 19 | padding: 7px 4px; 20 | color: inherit; 21 | box-sizing: border-box; 22 | } 23 | .book.with-search .book-summary .book-search { 24 | top: 0px; 25 | } 26 | .book.with-search .book-summary ul.summary { 27 | top: 50px; 28 | } 29 | .with-search .summary li[data-level] a[href*=".html#"] { 30 | display: none; 31 | } 32 | -------------------------------------------------------------------------------- /docs/reference-keys.txt: -------------------------------------------------------------------------------- 1 | variables-math-comparisons-and-strings 2 | help 3 | assignment 4 | names-with-weird-characters 5 | console-output 6 | math 7 | comparisons 8 | boolean 9 | strings 10 | strings-with-special-characters 11 | string-concatenation 12 | arrays 13 | everything-is-an-array 14 | creation 15 | array-generators 16 | concatenation 17 | indexing 18 | sampling-from-an-array 19 | array-constants 20 | array-operations 21 | array-functions 22 | array-sorting 23 | test-membership 24 | types 25 | numbers 26 | strings-1 27 | concatenation-1 28 | dates 29 | finding-the-type-of-a-variable 30 | checking-the-type 31 | converting-and-parsing 32 | special-types 33 | na 34 | factor 35 | control-flow 36 | if 37 | while 38 | for 39 | functions 40 | parameters 41 | scope 42 | a-function-in-a-function 43 | dot-dot-dot 44 | operators 45 | lists 46 | make-a-list 47 | accessing-elements-in-a-list 48 | brackets-for-real 49 | names-and-values 50 | libraries-and-packages 51 | -------------------------------------------------------------------------------- /_output.yml: -------------------------------------------------------------------------------- 1 | bookdown::gitbook: 2 | css: style.css 3 | config: 4 | toc: 5 | before: | 6 |