Skip to content

Commit

Permalink
new changes to chapter 1 through 5
Browse files Browse the repository at this point in the history
  • Loading branch information
wokech committed Mar 17, 2024
1 parent 9e629ef commit 490ccbf
Show file tree
Hide file tree
Showing 17 changed files with 404 additions and 360 deletions.
2 changes: 1 addition & 1 deletion docs/download_install.html
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ <h3 data-number="2.3.2" class="anchored" data-anchor-id="install-r"><span class=
<p>To install R on your personal computer, visit the R Project for Statistical Computing’s Comprehensive R Archive Network <a href="https://cloud.r-project.org/">CRAN</a>. Follow the illustrated steps shown below:</p>
<section id="step-1" class="level4" data-number="2.3.2.1">
<h4 data-number="2.3.2.1" class="anchored" data-anchor-id="step-1"><span class="header-section-number">2.3.2.1</span> Step 1</h4>
<p>On the CRAN homepage, select the appropriate version of R for your operating system (Linux, macOS, or Windows) (<a href="#fig-cran-1" class="quarto-xref">Figure&nbsp;<span class="quarto-unresolved-ref">fig-cran-1</span></a>).</p>
<p>On the CRAN homepage, select the appropriate version of R for your operating system (Linux, macOS, or Windows; see <a href="#fig-cran-1" class="quarto-xref">Figure&nbsp;<span class="quarto-unresolved-ref">fig-cran-1</span></a>).</p>
<div id="fig-cran-1" class="quarto-figure quarto-figure-center quarto-float anchored">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-cran-1-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Expand Down
Binary file added docs/images/navigating/rstudio_console_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/navigating/rstudio_menu_options_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/managing.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ <h2 id="toc-title">Table of contents</h2>
<li><a href="#projects" id="toc-projects" class="nav-link" data-scroll-target="#projects"><span class="header-section-number">4.3.2</span> Projects</a></li>
<li><a href="#scripts" id="toc-scripts" class="nav-link" data-scroll-target="#scripts"><span class="header-section-number">4.3.3</span> Scripts</a></li>
<li><a href="#working-directory" id="toc-working-directory" class="nav-link" data-scroll-target="#working-directory"><span class="header-section-number">4.3.4</span> Working Directory</a></li>
<li><a href="#finding-help-when-using-packages-and-functions" id="toc-finding-help-when-using-packages-and-functions" class="nav-link" data-scroll-target="#finding-help-when-using-packages-and-functions"><span class="header-section-number">4.3.5</span> Finding help when using packages and functions</a></li>
<li><a href="#finding-help-when-using-packages-functions-and-inbuilt-datasets" id="toc-finding-help-when-using-packages-functions-and-inbuilt-datasets" class="nav-link" data-scroll-target="#finding-help-when-using-packages-functions-and-inbuilt-datasets"><span class="header-section-number">4.3.5</span> Finding help when using packages, functions, and inbuilt datasets</a></li>
</ul></li>
<li><a href="#exercises" id="toc-exercises" class="nav-link" data-scroll-target="#exercises"><span class="header-section-number">4.4</span> Exercises</a></li>
<li><a href="#summary" id="toc-summary" class="nav-link" data-scroll-target="#summary"><span class="header-section-number">4.5</span> Summary</a></li>
Expand Down Expand Up @@ -358,8 +358,8 @@ <h3 data-number="4.3.4" class="anchored" data-anchor-id="working-directory"><spa
<p>The working directory is a file path or location on your computer that R uses for reading and writing files. The function <code>getwd()</code> prints the current working directory, and <code>setwd()</code> allows the user to set the working directory. This is where R looks for files that you ask it to load, and where it puts any files that you ask it to save.</p>
<p>The paths to files or directories can be defined using relative or absolute paths. The relative path is where the file is found in the location where the user is, and absolute includes the entire path from the root directory.</p>
</section>
<section id="finding-help-when-using-packages-and-functions" class="level3" data-number="4.3.5">
<h3 data-number="4.3.5" class="anchored" data-anchor-id="finding-help-when-using-packages-and-functions"><span class="header-section-number">4.3.5</span> Finding help when using packages and functions</h3>
<section id="finding-help-when-using-packages-functions-and-inbuilt-datasets" class="level3" data-number="4.3.5">
<h3 data-number="4.3.5" class="anchored" data-anchor-id="finding-help-when-using-packages-functions-and-inbuilt-datasets"><span class="header-section-number">4.3.5</span> Finding help when using packages, functions, and inbuilt datasets</h3>
<ul>
<li><p>There is a built-in help system that can be accessed via the “Help” menu, or one can use the <code>?</code> symbol before the function, package, or dataset to get a brief description and instructions for use.</p></li>
<li><p>Online R <a href="https://cran.r-project.org/manuals.html">documentation</a> is also available to allow the user to learn the basics of R.</p></li>
Expand Down
35 changes: 25 additions & 10 deletions docs/navigating.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,17 @@ <h4 data-number="3.3.1.1" class="anchored" data-anchor-id="menu-options"><span c
</section>
<section id="rstudio-interface-panes" class="level3" data-number="3.3.2">
<h3 data-number="3.3.2" class="anchored" data-anchor-id="rstudio-interface-panes"><span class="header-section-number">3.3.2</span> RStudio interface (Panes)</h3>
<p>When opened for the 1st time, the RStudio interface will have 3 panes: Console, Environment, and Navigation. To include the 4th required panel, click on “File” –&gt; “New File” –&gt; “R Script”. Now that the 4 panes are open, let us review their functions.</p>
<p>When opened for the 1st time, the RStudio interface will have 3 panes: Console, Environment, and Navigation. To include the 4th required panel, click on “File” –&gt; “New File” –&gt; “R Script”. Now that the 4 panes are open, let us review the functions of each panel shown below.</p>
<div id="fig-rstudio-console-1" class="quarto-figure quarto-figure-center quarto-float anchored">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-rstudio-console-1-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="images/navigating/rstudio_console_1.png" class="img-fluid figure-img">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-rstudio-console-1-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;3.2: The RStudio Console
</figcaption>
</figure>
</div>
<section id="script-pane-text-editor" class="level4" data-number="3.3.2.1">
<h4 data-number="3.3.2.1" class="anchored" data-anchor-id="script-pane-text-editor"><span class="header-section-number">3.3.2.1</span> Script Pane (Text Editor)</h4>
<p>The script pane allows the user to write, edit, and save code. This code can then be run, and the output will be displayed in the console pane.</p>
Expand All @@ -374,17 +384,22 @@ <h4 data-number="3.3.2.3" class="anchored" data-anchor-id="environmenthistory-pa
<section id="navigation-pane" class="level4" data-number="3.3.2.4">
<h4 data-number="3.3.2.4" class="anchored" data-anchor-id="navigation-pane"><span class="header-section-number">3.3.2.4</span> Navigation Pane</h4>
<p>The navigation pane allows the user to manage files (create new folders and scripts), view generated plots, and review and update installed packages. Additionally, there is a “Help” tab for basic queries, and “Viewer” and “Presentation” tabs for reviewing analysis outputs.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="images/navigating/r_console_1.png" class="img-fluid figure-img"></p>
<figcaption>The R Console</figcaption>
</figure>
</div>
</section>
</section>
<section id="rstudio-interface-menu-options" class="level3" data-number="3.3.3">
<h3 data-number="3.3.3" class="anchored" data-anchor-id="rstudio-interface-menu-options"><span class="header-section-number">3.3.3</span> RStudio interface (Menu Options)</h3>
<p>The RStudio interface has a number of menu bar options (<a href="#fig-rstudio-console-1" class="quarto-xref">Figure&nbsp;<span class="quarto-unresolved-ref">fig-rstudio-console-1</span></a>). To orient the user, a brief description of each menu bar option has been provided below.</p>
<p>The RStudio interface has a number of menu bar options shown below (<a href="#fig-rstudio-menu-options-1" class="quarto-xref">Figure&nbsp;<span class="quarto-unresolved-ref">fig-rstudio-menu-options-1</span></a>).</p>
<div id="fig-rstudio-menu-options-1" class="quarto-figure quarto-figure-center quarto-float anchored">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-rstudio-menu-options-1-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="images/navigating/rstudio_menu_options_1.png" class="img-fluid figure-img">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-rstudio-menu-options-1-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;3.3: RStudio interface (Menu Options)
</figcaption>
</figure>
</div>
<p>To orient the user, a brief description of each menu bar option has been provided below.</p>
<ul>
<li><p>File: Create new files and projects, save them, as well as open and close the projects. Additionally, importing of datasets is made much easier by the “Import Dataset” option.</p></li>
<li><p>Edit: Using this option, one can cut, copy, and paste, as well as undo and redo any actions.</p></li>
Expand All @@ -394,7 +409,7 @@ <h3 data-number="3.3.3" class="anchored" data-anchor-id="rstudio-interface-menu-
<li><p>Session: Create sessions, load workspaces, and set the working directories.</p></li>
<li><p>Build: Configure build tools and edit the project options.</p></li>
<li><p>Debug: Debug your code.</p></li>
<li><p><em>Profile:</em></p></li>
<li><p>Profile: Helps the user understand how R spends its time, and helps the R user to run the code faster.</p></li>
<li><p>Help: The help section allows one to access tools for troubleshooting. Additionally, it contains documentation and cheatsheets that allow for to discover more about the software.</p></li>
<li><p>Tools: Install packages and check for package updates. Additionally, one can review version control options, access the terminal, and look at keyboard shortcuts. A short snippet of the numerous shortcuts is shown below (<a href="#fig-rstudio-ks-1" class="quarto-xref">Figure&nbsp;<span class="quarto-unresolved-ref">fig-rstudio-ks-1</span></a>).</p></li>
</ul>
Expand All @@ -404,7 +419,7 @@ <h3 data-number="3.3.3" class="anchored" data-anchor-id="rstudio-interface-menu-
<img src="images/navigating/rstudio_ks_1.png" class="img-fluid figure-img">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-rstudio-ks-1-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;3.2: A list of shortcuts available in RStudio
Figure&nbsp;3.4: A list of shortcuts available in RStudio
</figcaption>
</figure>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ <h3 data-number="1.3.2" class="anchored" data-anchor-id="uses-of-r-and-rstudio">
<h3 data-number="1.3.3" class="anchored" data-anchor-id="primary-advantages-of-r-and-rstudio"><span class="header-section-number">1.3.3</span> Primary advantages of R and RStudio</h3>
<ol type="i">
<li><p>R and RStudio are free and open-source software programs, which makes them accessible to anyone with a computer and an internet connection. This accessibility is key in enabling learners from all socioeconomic levels and geographic regions to have a chance to work with statistical software,</p></li>
<li><p>Numerous user communities exist for the R/RStudio software. These communities (listed in the Appendix) provide learning support and assist with technical challenges,</p></li>
<li><p>Very many user communities exist for the R/RStudio software. These communities (listed in the Appendix) provide learning support and assist with technical challenges,</p></li>
<li><p>Numerous freely available packages/extensions have been developed by the R and RStudio user communities to facilitate all forms of computational analysis, visualization, and publication. The (<a href="https://cran.r-project.org/">CRAN</a>) has packages that contain datasets as well as allow one to perform statistical analysis and data visualization,</p></li>
<li><p>R and RStudio allow for reproducible analysis where scripts and workflows can be shared with fellow users, and,</p></li>
<li><p>The R/RStudio software is cross-platform, which means that it can be used on Linux, Windows, and Mac operating systems.</p></li>
Expand Down
2 changes: 1 addition & 1 deletion download_install.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To install R on your personal computer, visit the R Project for Statistical Comp

#### Step 1

On the CRAN homepage, select the appropriate version of R for your operating system (Linux, macOS, or Windows) (@fig-cran-1).
On the CRAN homepage, select the appropriate version of R for your operating system (Linux, macOS, or Windows; see @fig-cran-1).

![The CRAN Homepage (Part 1)](images/downloading/r_cran_1.png){#fig-cran-1}

Expand Down
Binary file added images/navigating/rstudio_menu_options_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion importing.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Example:
read.table("datasets/r4novice_datafile.csv", header = TRUE, sep = ",")
```

- `read.csv()` imports data with comma separated values. Alternatively, we use `read.csv2()` is used where a comma (“,”) indicates a decimal point and a semicolon (“;”) is a field separator.
- `read.csv()` imports data with comma separated values. Alternatively, we use `read.csv2()` is used where a comma (“,”) indicates a decimal point and a semicolon (“;”) is a field separator.

Example:

Expand Down
Loading

0 comments on commit 490ccbf

Please sign in to comment.