Skip to content

Commit

Permalink
Deployed a847a75 with MkDocs version: 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
upendrabhattarai committed Oct 7, 2024
1 parent 78dceab commit 369e2a0
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,10 @@ <h3 id="the-basics">The basics<a class="headerlink" href="#the-basics" title="Pe
</tbody>
</table>
<p></center></p>
<p>For example, if we have text file where the columns are separated by commas (comma-separated values or comma-delimited), you could use the function <code>read.csv</code>. However, if the data are separated by a different delimiter in a text file (e.g. ":", ";", " "), you could use the generic <code>read.table</code> function and specify the delimiter (<code>sep = " "</code>) as an argument in the function. </p>
<p>For example, if we have text file where the columns are separated by commas (comma-separated values or comma-delimited), you could use the function <code>read.csv</code>. However, if the data are separated by a different delimiter in a text file (e.g. ":", ";", " ", "\t"), you could use the generic <code>read.table</code> function and specify the delimiter (<code>sep = " "</code>) as an argument in the function. </p>
<blockquote>
<p>Note: The <code>"\t"</code> delimiter is shorthand for tab.</p>
</blockquote>
<p>In the above table we refer to base R functions as being contained in the "utils" package. In addition to base R functions, we have also listed functions from some other packages that can be used to import data, specifically the "readr" package that installs when you install the "tidyverse" suite of packages.</p>
<p>In addition to plain text files, you can also import data from other statistical analysis packages and Excel using functions from different packages. </p>
<p><center></p>
Expand Down Expand Up @@ -692,7 +695,7 @@ <h3 id="list-of-functions-for-data-inspection">List of functions for data inspec
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1-2.1-2M12.5 7v5.2l4 2.4-1 1L11 13V7h1.5M11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2v1.8Z"/></svg>
</span>
2024-08-09
2024-10-07
</span>


Expand Down
10 changes: 5 additions & 5 deletions day_2_exercise/D2.4e_reordering-to-match-datasets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,10 @@ <h2 id="reordering-data-to-match">Reordering data to match<a class="headerlink"
<p>In the previous lesson, we learned how to determine whether the same data is present in two datasets, in addition to, whether it is in the same order. In this lesson, we will explore how to reorder the data such that the datasets are matching.</p>
<h2 id="manual-reordering-of-data-using-indices">Manual reordering of data using indices<a class="headerlink" href="#manual-reordering-of-data-using-indices" title="Permanent link">&para;</a></h2>
<p>Indexing <code>[ ]</code> can be used to extract values from a dataset as we saw earlier, but we can also use it to rearrange our data values. </p>
<p><div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">teaching_team</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="s">&quot;Jihe&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Mary&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Meeta&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Radhika&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Will&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Emma&quot;</span><span class="p">)</span>
<p><div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">teaching_team</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="s">&quot;Jihe&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Mary&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Meeta&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Radhika&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Will&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Emma&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Heather&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Elizabeth&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Noor&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Upen&quot;</span><span class="p">)</span>
</code></pre></div>
<center>
<a class="glightbox" href="../../img/teaching-team.png" data-type="image" data-width="auto" data-height="auto" data-desc-position="bottom"><img alt="teaching_team" src="../../img/teaching-team.png" width="600" /></a>
<a class="glightbox" href="../../img/teaching_team_vector.png" data-type="image" data-width="auto" data-height="auto" data-desc-position="bottom"><img alt="teaching_team" src="../../img/teaching_team_vector.png" width="1000" /></a>
</center></p>
<p>Remember that we can return values in a vector by specifying it's position or index:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="c1"># Extracting values from a vector</span>
Expand All @@ -388,11 +388,11 @@ <h2 id="manual-reordering-of-data-using-indices">Manual reordering of data using
</code></pre></div>
<p>Similarly, we can extract all of the values and reorder them:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="c1"># Extracting all values and reordering them</span>
<a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="n">teaching_team</span><span class="p">[</span><span class="nf">c</span><span class="p">(</span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="m">4</span><span class="p">,</span><span class="w"> </span><span class="m">6</span><span class="p">,</span><span class="w"> </span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)]</span>
<a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="n">teaching_team</span><span class="p">[</span><span class="nf">c</span><span class="p">(</span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="m">4</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">6</span><span class="p">,</span><span class="w"> </span><span class="m">9</span><span class="p">,</span><span class="w"> </span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="m">8</span><span class="p">,</span><span class="w"> </span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">7</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)]</span>
</code></pre></div>
<p>If we want to save our results, we need to assign to a variable:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="c1"># Saving the results to a variable</span>
<a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a><span class="n">reorder_teach</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">teaching_team</span><span class="p">[</span><span class="nf">c</span><span class="p">(</span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="m">4</span><span class="p">,</span><span class="w"> </span><span class="m">6</span><span class="p">,</span><span class="w"> </span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)]</span><span class="w"> </span>
<a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a><span class="n">reorder_teach</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">teaching_team</span><span class="p">[</span><span class="nf">c</span><span class="p">(</span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="m">4</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">6</span><span class="p">,</span><span class="w"> </span><span class="m">9</span><span class="p">,</span><span class="w"> </span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="m">8</span><span class="p">,</span><span class="w"> </span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">7</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)]</span>
</code></pre></div>
<div class="admonition question">
<p class="admonition-title">Exercise</p>
Expand Down Expand Up @@ -529,7 +529,7 @@ <h3 id="reordering-genomic-data-using-match-function">Reordering genomic data us
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1-2.1-2M12.5 7v5.2l4 2.4-1 1L11 13V7h1.5M11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2v1.8Z"/></svg>
</span>
2024-08-09
2024-10-07
</span>


Expand Down
4 changes: 2 additions & 2 deletions day_3_exercise/D3.2e_boxplot_exercise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ <h3 id="3-changing-default-colors">3. Changing default colors<a class="headerlin
</ul>
</li>
</ol>
<p>We have <a href="https://hbctraining.github.io/Training-modules/Tidyverse_ggplot2/lessons/ggplot2.html#customizing-data-point-colors">a separate lesson about using color palettes from the package RColorBrewer</a>, if you are interested.</p>
<p>We have <a href="https://github.com/hbctraining/Training-modules/blob/master/Tidyverse_ggplot2/lessons/03_ggplot2.md#customizing-data-point-colors">a separate lesson about using color palettes from the package RColorBrewer</a>, if you are interested.</p>
<p>You are not restricted to using colors by writing them out as character vectors. You have the choice of a lot of colors in R, and you can do so by using their <em>hexadecimal code</em>. For example, "#FF0000" would be red and "#00FF00" would be green similarly, <code>#FFFFFF</code> would be white and <code>#000000</code> would be black. <a href="http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/#hexadecimal-color-code-chart">click here for more information about color palettes in R</a>.</p>
<p><strong>OPTIONAL Exercise:</strong></p>
<ul>
Expand Down Expand Up @@ -484,7 +484,7 @@ <h3 id="3-changing-default-colors">3. Changing default colors<a class="headerlin
<span class="md-icon" title="Last update">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1-2.1-2M12.5 7v5.2l4 2.4-1 1L11 13V7h1.5M11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2v1.8Z"/></svg>
</span>
2024-08-09
2024-10-07
</span>


Expand Down
Binary file added img/teaching_team_vector.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 search/search_index.json

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,137 +2,137 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/Workshop_Schedule/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_1/D1.2_introR-R-and-RStudio/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_1_exercise/D1.1e_r_syntax_and_data_structures/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_1_exercise/D1.2e_functions_and_arguments/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_1_exercise/D1.3e_reading_in_and_data_inspection/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_2/D2.1_in_class_exercises/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_2/D2.2_data_wrangling/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_2_exercise/D2.1e_packages_and_libraries/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_2_exercise/D2.2e_introR-data-wrangling/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_2_exercise/D2.3e_identifying-matching-elements/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_2_exercise/D2.4e_reordering-to-match-datasets/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_2_exercise/D2.5e_setting_up_to_plot/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_3/D3.1_in_class_exercises/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_3/D3.2_plotting_with_ggplot2/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_3/basic_plots_in_r/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_3_exercise/D3.1e_Custom_Functions_ggplot2/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_3_exercise/D3.2e_boxplot_exercise/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_3_exercise/D3.3e_exporting_data_and_plots/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_3_exercise/D3.4e_finding_help/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_3_exercise/D3.5e_tidyverse/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_4/D4.1_in_class_exercises/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_4_exercise_n_answer_keys/D4.1e_intro_to_R_hw/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_4_exercise_n_answer_keys/Day1_Homework_Answer-Key/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_4_exercise_n_answer_keys/Day2_Homework_Answer-Key/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_4_exercise_n_answer_keys/Day3_Homework_Answer-Key/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://github.com/hbctraining/Intro-to-R-mkdocs/day_4_exercise_n_answer_keys/Day4_Intro_to_R_Answer-Key/</loc>
<lastmod>2024-08-12</lastmod>
<lastmod>2024-10-07</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit 369e2a0

Please sign in to comment.