Skip to content

Commit

Permalink
post day 1 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wzbillings committed Jul 16, 2024
1 parent 5b06c66 commit f2e7e75
Show file tree
Hide file tree
Showing 39 changed files with 250 additions and 111 deletions.
8 changes: 5 additions & 3 deletions _freeze/modules/Module06-DataSubset/execute-results/html.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions docs/modules/Module06-DataSubset.html
Original file line number Diff line number Diff line change
Expand Up @@ -1478,18 +1478,19 @@ <h2>Using indexing and logical operators to rename columns</h2>
<div class="cell-output cell-output-stdout">
<pre><code>[1] FALSE TRUE FALSE FALSE FALSE</code></pre>
</div>
<div class="sourceCode cell-code" id="cb73"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb73-1"><a></a>cn[cn<span class="sc">==</span><span class="st">"IgG_concentration"</span>] <span class="ot">&lt;-</span><span class="st">"IgG_concentration_mIU"</span> <span class="co">#rename cn to "IgG_concentration_mIU" when cn is "IgG_concentration"</span></span>
<div class="sourceCode cell-code" id="cb73"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb73-1"><a></a>cn[cn<span class="sc">==</span><span class="st">"IgG_concentration"</span>] <span class="ot">&lt;-</span><span class="st">"IgG_concentration_IU/mL"</span> <span class="co">#rename cn to "IgG_concentration_IU" when cn is "IgG_concentration"</span></span>
<span id="cb73-2"><a></a><span class="fu">colnames</span>(df) <span class="ot">&lt;-</span> cn</span>
<span id="cb73-3"><a></a><span class="fu">colnames</span>(df)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] "observation_id" "IgG_concentration_mIU" "age"
[4] "gender" "slum" </code></pre>
<pre><code>[1] "observation_id" "IgG_concentration_IU/mL"
[3] "age" "gender"
[5] "slum" </code></pre>
</div>
</div>
<p><br></p>
<p>Note, I am resetting the column name back to the original name for the sake of the rest of the module.</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb75"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb75-1"><a></a><span class="fu">colnames</span>(df)[<span class="fu">colnames</span>(df)<span class="sc">==</span><span class="st">"IgG_concentration_mIU"</span>] <span class="ot">&lt;-</span> <span class="st">"IgG_concentration"</span> <span class="co">#reset</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="sourceCode cell-code" id="cb75"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb75-1"><a></a><span class="fu">colnames</span>(df)[<span class="fu">colnames</span>(df)<span class="sc">==</span><span class="st">"IgG_concentration_IU/mL"</span>] <span class="ot">&lt;-</span> <span class="st">"IgG_concentration"</span> <span class="co">#reset</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</section>
<section id="using-indexing-and-logical-operators-to-subset-data" class="slide level2">
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/Module07-VarCreationClassesSummaries.html
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ <h2>Adding new columns with <code>transform()</code></h2>
</section>
<section id="creating-conditional-variables" class="slide level2">
<h2>Creating conditional variables</h2>
<p>One frequently used tool is creating variables with conditions. A general function for creating new variables based on existing variables is the Base R <code>ifelse()</code> function, which “returns a value depending on whether the element of test is <code>TRUE</code> or <code>FALSE</code>.”</p>
<p>One frequently used tool is creating variables with conditions. A general function for creating new variables based on existing variables is the Base R <code>ifelse()</code> function, which “returns a value depending on whether the element of test is <code>TRUE</code> or <code>FALSE</code> or <code>NA</code>.</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb9"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb9-1"><a></a>?ifelse</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
Expand Down Expand Up @@ -1584,7 +1584,7 @@ <h2>Numeric variable data summary</h2>
</section>
<section id="numeric-variable-data-summary-1" class="slide level2">
<h2>Numeric variable data summary</h2>
<p>Let’s look at a help file for <code>mean()</code> to make note of the <code>na.rm</code> argument</p>
<p>Let’s look at a help file for <code>range()</code> to make note of the <code>na.rm</code> argument</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb96"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb96-1"><a></a>?range</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
Expand Down Expand Up @@ -2067,7 +2067,7 @@ <h2>Summary</h2>
<li>One useful function for creating new variables based on existing variables is the <code>ifelse()</code> function, which returns a value depending on whether the element of test is <code>TRUE</code> or <code>FALSE</code></li>
<li>The <code>class()</code> function allows you to evaluate the class of an object.</li>
<li>There are two types of numeric class objects: integer and double</li>
<li>Logical class objects only have <code>TRUE</code> or <code>False</code> (without quotes)</li>
<li>Logical class objects only have <code>TRUE</code> or <code>FALSE</code> or <code>NA</code> (without quotes)</li>
<li><code>is.CLASS_NAME(x)</code> can be used to test the class of an object x</li>
<li><code>as.CLASS_NAME(x)</code> can be used to change the class of an object x</li>
<li>Factors are a special character class that has levels</li>
Expand Down
Loading

0 comments on commit f2e7e75

Please sign in to comment.