Skip to content

Commit

Permalink
Initial updates following Neale's review
Browse files Browse the repository at this point in the history
  • Loading branch information
arranhamlet committed Oct 18, 2024
1 parent 259560d commit e6a4aa9
Show file tree
Hide file tree
Showing 92 changed files with 17,127 additions and 4,685 deletions.
4 changes: 2 additions & 2 deletions html_outputs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ <h1 class="title">The Epidemiologist R Handbook</h1>
<div>
<div class="quarto-title-meta-heading">Last updated</div>
<div class="quarto-title-meta-contents">
<p class="date">Oct 2, 2024</p>
<p class="date">Oct 18, 2024</p>
</div>
</div>

Expand Down Expand Up @@ -1463,7 +1463,7 @@ <h3 class="unnumbered anchored" data-anchor-id="contribution">Contribution</h3>
</div>
</div>
</footer>
<script>var lightboxQuarto = GLightbox({"openEffect":"zoom","selector":".lightbox","loop":false,"descPosition":"bottom","closeEffect":"zoom"});
<script>var lightboxQuarto = GLightbox({"selector":".lightbox","closeEffect":"zoom","descPosition":"bottom","openEffect":"zoom","loop":false});
(function() {
let previousOnload = window.onload;
window.onload = () => {
Expand Down
10 changes: 5 additions & 5 deletions html_outputs/new_pages/basics.html
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ <h3 class="unnumbered anchored" data-anchor-id="functions-with-multiple-argument
<ul>
<li>Show proportions instead of counts (set <code>proportional = TRUE</code> when the default is <code>FALSE</code>)<br>
</li>
<li>Specify the two colors to use (<code>pal =</code> is short for “palette” and is supplied with a vector of two color names. See the <a href="https://epirhandbook.com/new_pages/basics.html#objects">objects</a> page for how the function <code>c()</code> makes a vector)</li>
<li>Specify the two colors to use (<code>pal =</code> is short for “palette” and is supplied with a vector of two color names. See the <a href="../new_pages/basics.html#objects">objects</a> page for how the function <code>c()</code> makes a vector)</li>
</ul>
<p><span style="color: black;"><strong><em>NOTE:</em></strong> For arguments that you specify with both parts of the argument (e.g.&nbsp;<code>proportional = TRUE</code>), their order among all the arguments does not matter.</span></p>
<div class="cell">
Expand Down Expand Up @@ -1327,7 +1327,7 @@ <h3 class="unnumbered anchored" data-anchor-id="install-and-load">Install and lo
</ol>
<section id="your-library" class="level4 unnumbered">
<h4 class="unnumbered anchored" data-anchor-id="your-library">Your library</h4>
<p>Your “library” is actually a folder on your computer, containing a folder for each package that has been installed. Find out where R is installed in your computer, and look for a folder called “win-library”. For example: <code>R\win-library\4.4.1</code> (the 4.4.1 is the R version - you’ll have a different library for each R version you’ve downloaded).</p>
<p>Your “library” is actually a folder on your computer, containing a folder for each package that has been installed. Find out where R is installed in your computer, and look for a folder called “library”. For example: <code>R\4.4.1\library</code> (the 4.4.1 is the R version - you’ll have a different library for each R version you’ve downloaded).</p>
<p>You can print the file path to your library by entering <code>.libPaths()</code> (empty parentheses). This becomes especially important if working with <a href="../new_pages/network_drives.html">R on network drives</a>.</p>
</section>
<section id="install-from-cran" class="level4 unnumbered">
Expand Down Expand Up @@ -1364,7 +1364,7 @@ <h4 class="unnumbered anchored" data-anchor-id="how-to-install-and-load">How to
</div>
<p>To check whether a package is installed or loaded, you can view the Packages pane in RStudio. If the package is installed, it is shown there with version number. If its box is checked, it is loaded for the current session.</p>
<p><strong>Install from Github</strong></p>
<p>Sometimes, you need to install a package that is not yet available from CRAN. Or perhaps the package is available on CRAN but you want the <em>development version</em> with new features not yet offered in the more stable published CRAN version. These are often hosted on the website <a href="https://github.com/">github.com</a> in a free, public-facing code “repository”. Read more about Github in the handbook page on <a href="https://epirhandbook.com/new_pages/collaboration.html">Version control and collaboration with Git and Github</a>.</p>
<p>Sometimes, you need to install a package that is not yet available from CRAN. Or perhaps the package is available on CRAN but you want the <em>development version</em> with new features not yet offered in the more stable published CRAN version. These are often hosted on the website <a href="https://github.com/">github.com</a> in a free, public-facing code “repository”. Read more about Github in the handbook page on <a href="../new_pages/collaboration.html">Version control and collaboration with Git and Github</a>.</p>
<p>To download R packages from Github, you can use the function <code>p_load_gh()</code> from <strong>pacman</strong>, which will install the package if necessary, and load it for use in your current R session. Alternatives to install include using the <strong>remotes</strong> or <strong>devtools</strong> packages. Read more about all the <strong>pacman</strong> functions in the <a href="https://cran.r-project.org/web/packages/pacman/pacman.pdf">package documentation</a>.</p>
<p>To install from Github, you have to provide more information. You must provide:</p>
<ol type="1">
Expand Down Expand Up @@ -1738,7 +1738,7 @@ <h3 class="unnumbered anchored" data-anchor-id="defining-objects--">Defining obj
</div>
</div>
<p><strong>Columns</strong></p>
<p>Columns in a dataset are also objects and can be defined, over-written, and created as described below in the section on <a href="https://epirhandbook.com/new_pages/basics.html#columnsvariables">Columns</a>.</p>
<p>Columns in a dataset are also objects and can be defined, over-written, and created as described below in the section on <a href="../new_pages/basics.html#columnsvariables">Columns</a>.</p>
<p>You can use the assignment operator from <strong>base</strong> R to create a new column. Below, the new column <code>bmi</code> (Body Mass Index) is created, and for each row the new value is result of a mathematical operation on the row’s value in the <code>wt_kg</code> and <code>ht_cm</code> columns.</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb34"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="co"># create new "bmi" column using base R syntax</span></span>
Expand Down Expand Up @@ -3348,7 +3348,7 @@ <h3 class="unnumbered anchored" data-anchor-id="code-assists">Code assists</h3>
</div>
</div>
</footer>
<script>var lightboxQuarto = GLightbox({"descPosition":"bottom","openEffect":"zoom","loop":false,"selector":".lightbox","closeEffect":"zoom"});
<script>var lightboxQuarto = GLightbox({"descPosition":"bottom","closeEffect":"zoom","loop":false,"openEffect":"zoom","selector":".lightbox"});
(function() {
let previousOnload = window.onload;
window.onload = () => {
Expand Down
101 changes: 44 additions & 57 deletions html_outputs/new_pages/characters_strings.html

Large diffs are not rendered by default.

Loading

0 comments on commit e6a4aa9

Please sign in to comment.