Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-paul-2006 committed Dec 12, 2024
2 parents cae8afe + b411b2a commit f159c83
Show file tree
Hide file tree
Showing 24 changed files with 3,874 additions and 154 deletions.
Binary file modified docs/data/writeThisMultipleXLSX.xlsx
Binary file not shown.
Binary file modified docs/data/writeThisXLSX.xlsx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ <h4 class="date"><a href="https://rockefelleruniversity.github.io/Intro_To_R_1Da
</p>
<p>These exercises are about the matrices sections of <a href="https://rockefelleruniversity.github.io/Intro_To_R_1Day/">Introduction
to R</a>.</p>
<p>These exercises cover the matrices sections of <a href="%22introToR_Day1.html%22">Introduction to R</a>.</p>
<p><strong>Exercise 1</strong></p>
<ul>
<li>Create a matrix containing information on gene names Gene_1, Gene_2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ <h4 class="date"><a href="https://rockefelleruniversity.github.io/Intro_To_R_1Da
</p>
<p>These exercises are about the matrices sections of <a href="https://rockefelleruniversity.github.io/Intro_To_R_1Day/">Introduction
to R</a>.</p>
<p>These exercises cover the matrices sections of <a href="%22introToR_Day1.html%22">Introduction to R</a>.</p>
<p><strong>Exercise 1</strong></p>
<ul>
<li>Create a matrix containing information on gene names Gene_1, Gene_2,
Expand Down
64 changes: 32 additions & 32 deletions docs/presentations/singlepage/introToR_Session1.html
Original file line number Diff line number Diff line change
Expand Up @@ -3082,7 +3082,7 @@ <h2>More complex objects</h2>
manage Dates or Times.</p>
<div class="sourceCode" id="cb330"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb330-1"><a href="#cb330-1" tabindex="-1"></a>Time <span class="ot">&lt;-</span> <span class="fu">Sys.time</span>()</span>
<span id="cb330-2"><a href="#cb330-2" tabindex="-1"></a>Time</span></code></pre></div>
<pre><code>## [1] &quot;2024-12-12 02:00:20 UTC&quot;</code></pre>
<pre><code>## [1] &quot;2024-12-12 18:12:15 UTC&quot;</code></pre>
</div>
<div id="more-complex-objects-1" class="section level2">
<h2>More complex objects</h2>
Expand Down Expand Up @@ -3110,11 +3110,11 @@ <h2>More complex objects</h2>
<h2>More complex objects</h2>
<p>We can also use the arithmetic operations with our time objects.</p>
<div class="sourceCode" id="cb337"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb337-1"><a href="#cb337-1" tabindex="-1"></a>Time</span></code></pre></div>
<pre><code>## [1] &quot;2024-12-12 02:00:20 UTC&quot;</code></pre>
<pre><code>## [1] &quot;2024-12-12 18:12:15 UTC&quot;</code></pre>
<div class="sourceCode" id="cb339"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb339-1"><a href="#cb339-1" tabindex="-1"></a>Time <span class="sc">-</span> <span class="dv">120</span></span></code></pre></div>
<pre><code>## [1] &quot;2024-12-12 01:58:20 UTC&quot;</code></pre>
<pre><code>## [1] &quot;2024-12-12 18:10:15 UTC&quot;</code></pre>
<div class="sourceCode" id="cb341"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb341-1"><a href="#cb341-1" tabindex="-1"></a>TimeNow <span class="sc">-</span> Time</span></code></pre></div>
<pre><code>## Time difference of 0.1078458 secs</code></pre>
<pre><code>## Time difference of 0.1084907 secs</code></pre>
</div>
<div id="more-complex-objects-5" class="section level2">
<h2>More complex objects</h2>
Expand All @@ -3125,18 +3125,18 @@ <h2>More complex objects</h2>
<p>We can also change the timezone by specifying a <strong>tz</strong>
parameter</p>
<div class="sourceCode" id="cb343"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb343-1"><a href="#cb343-1" tabindex="-1"></a><span class="fu">format</span>(Time,<span class="at">format=</span><span class="st">&quot;%H O&#39;Clock %p %A on %B %dth&quot;</span>)</span></code></pre></div>
<pre><code>## [1] &quot;02 O&#39;Clock AM Thursday on December 12th&quot;</code></pre>
<pre><code>## [1] &quot;18 O&#39;Clock PM Thursday on December 12th&quot;</code></pre>
<div class="sourceCode" id="cb345"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb345-1"><a href="#cb345-1" tabindex="-1"></a><span class="fu">format</span>(Time,<span class="at">format=</span><span class="st">&quot;%H O&#39;Clock %p %A on %B %dth&quot;</span>,<span class="at">tz =</span> <span class="st">&quot;GMT&quot;</span>)</span></code></pre></div>
<pre><code>## [1] &quot;02 O&#39;Clock AM Thursday on December 12th&quot;</code></pre>
<pre><code>## [1] &quot;18 O&#39;Clock PM Thursday on December 12th&quot;</code></pre>
</div>
<div id="complex-to-base-objects" class="section level2">
<h2>Complex to base objects</h2>
<p>Most of the time we can convert more complex object back to our basic
object types we are more familar with.</p>
<div class="sourceCode" id="cb347"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb347-1"><a href="#cb347-1" tabindex="-1"></a><span class="fu">as.character</span>(Time)</span></code></pre></div>
<pre><code>## [1] &quot;2024-12-12 02:00:20.799085&quot;</code></pre>
<pre><code>## [1] &quot;2024-12-12 18:12:15.725485&quot;</code></pre>
<div class="sourceCode" id="cb349"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb349-1"><a href="#cb349-1" tabindex="-1"></a><span class="fu">as.numeric</span>(TimeNow<span class="sc">-</span>Time)</span></code></pre></div>
<pre><code>## [1] 0.1078458</code></pre>
<pre><code>## [1] 0.1084907</code></pre>
</div>
<div id="complex-objects-summary" class="section level2">
<h2>Complex objects summary</h2>
Expand Down Expand Up @@ -3245,111 +3245,111 @@ <h2>Data from external sources</h2>
Gene_a
</td>
<td style="text-align:right;">
3.362639
3.567960
</td>
<td style="text-align:right;">
3.523646
3.751809
</td>
<td style="text-align:right;">
4.704296
5.156441
</td>
</tr>
<tr>
<td style="text-align:left;">
Gene_b
</td>
<td style="text-align:right;">
2.768784
3.969382
</td>
<td style="text-align:right;">
2.772147
2.563824
</td>
<td style="text-align:right;">
4.844562
4.743562
</td>
</tr>
<tr>
<td style="text-align:left;">
Gene_c
</td>
<td style="text-align:right;">
5.078882
4.874842
</td>
<td style="text-align:right;">
3.713159
5.002982
</td>
<td style="text-align:right;">
6.027094
4.089564
</td>
</tr>
<tr>
<td style="text-align:left;">
Gene_d
</td>
<td style="text-align:right;">
3.706215
4.319586
</td>
<td style="text-align:right;">
4.482517
3.346743
</td>
<td style="text-align:right;">
4.814330
4.855645
</td>
</tr>
<tr>
<td style="text-align:left;">
Gene_e
</td>
<td style="text-align:right;">
10.442474
9.767292
</td>
<td style="text-align:right;">
10.785325
8.984913
</td>
<td style="text-align:right;">
8.939309
9.525845
</td>
</tr>
<tr>
<td style="text-align:left;">
Gene_f
</td>
<td style="text-align:right;">
9.620548
11.038205
</td>
<td style="text-align:right;">
10.042143
10.778420
</td>
<td style="text-align:right;">
10.399179
10.270429
</td>
</tr>
<tr>
<td style="text-align:left;">
Gene_g
</td>
<td style="text-align:right;">
10.155296
8.517023
</td>
<td style="text-align:right;">
9.964465
11.603366
</td>
<td style="text-align:right;">
9.048469
7.418904
</td>
</tr>
<tr>
<td style="text-align:left;">
Gene_h
</td>
<td style="text-align:right;">
10.082693
9.140641
</td>
<td style="text-align:right;">
12.054921
9.419702
</td>
<td style="text-align:right;">
10.230600
10.145435
</td>
</tr>
</tbody>
Expand Down
12 changes: 6 additions & 6 deletions docs/presentations/singlepage/introToR_Session2.html
Original file line number Diff line number Diff line change
Expand Up @@ -2390,8 +2390,8 @@ <h2>Custom function example</h2>
<span id="cb156-10"><a href="#cb156-10" tabindex="-1"></a>A <span class="ot">&lt;-</span> <span class="fu">rnorm</span>(<span class="dv">20</span>)</span>
<span id="cb156-11"><a href="#cb156-11" tabindex="-1"></a></span>
<span id="cb156-12"><a href="#cb156-12" tabindex="-1"></a><span class="fu">my_zscore</span>(<span class="at">my_number=</span>A[<span class="dv">1</span>], <span class="at">my_vector=</span>A)</span></code></pre></div>
<pre><code>## Mean is -0.0473813821205204</code></pre>
<pre><code>## [1] 2.066187</code></pre>
<pre><code>## Mean is 0.260665894154018</code></pre>
<pre><code>## [1] -0.2426098</code></pre>
</div>
<div id="debugging-functions" class="section level2">
<h2>Debugging functions</h2>
Expand All @@ -2406,10 +2406,10 @@ <h2>Debugging functions</h2>
<h2>Custom functions and apply</h2>
<p>These custom functions can also be utilized with apply.</p>
<div class="sourceCode" id="cb160"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb160-1"><a href="#cb160-1" tabindex="-1"></a><span class="fu">sapply</span>(A, my_zscore, <span class="at">my_vector=</span>A)</span></code></pre></div>
<pre><code>## [1] 2.06618698 0.17165772 -0.71309305 0.04463075 -1.24264432 0.21368949
## [7] -0.82084457 0.89006732 -0.57284618 -0.46639582 -1.28333645 0.98048258
## [13] 1.31683429 -0.36486729 -0.02032230 -0.68673550 0.13403087 1.02971875
## [19] 1.13413397 -1.81034725</code></pre>
<pre><code>## [1] -0.24260979 0.37093999 0.58712023 0.81503665 0.92783453 0.54524311
## [7] -1.15824154 -0.38544962 0.08283829 0.73612828 -1.39531982 -0.48690779
## [13] -2.08700758 1.41872341 -0.02320079 0.08587476 1.50147491 -1.67344992
## [19] 0.86495743 -0.48398475</code></pre>
</div>
</div>
<div id="getting-additional-libraries" class="section level1">
Expand Down
64 changes: 32 additions & 32 deletions docs/presentations/slides/introToR_Session1.html
Original file line number Diff line number Diff line change
Expand Up @@ -2722,7 +2722,7 @@
```

```
## [1] "2024-12-12 02:00:18 UTC"
## [1] "2024-12-12 18:12:13 UTC"
```

---
Expand Down Expand Up @@ -2777,23 +2777,23 @@
```

```
## [1] "2024-12-12 02:00:18 UTC"
## [1] "2024-12-12 18:12:13 UTC"
```

``` r
Time - 120
```

```
## [1] "2024-12-12 01:58:18 UTC"
## [1] "2024-12-12 18:10:13 UTC"
```

``` r
TimeNow - Time
```

```
## Time difference of 0.1020856 secs
## Time difference of 0.1018271 secs
```

---
Expand All @@ -2811,15 +2811,15 @@
```

```
## [1] "02 O'Clock AM Thursday on December 12th"
## [1] "18 O'Clock PM Thursday on December 12th"
```

``` r
format(Time,format="%H O'Clock %p %A on %B %dth",tz = "GMT")
```

```
## [1] "02 O'Clock AM Thursday on December 12th"
## [1] "18 O'Clock PM Thursday on December 12th"
```

---
Expand All @@ -2833,15 +2833,15 @@
```

```
## [1] "2024-12-12 02:00:18.932222"
## [1] "2024-12-12 18:12:13.836075"
```

``` r
as.numeric(TimeNow-Time)
```

```
## [1] 0.1020856
## [1] 0.1018271
```

---
Expand Down Expand Up @@ -2958,51 +2958,51 @@
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:left;"&gt; Gene_a &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.474330 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 3.317462 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.099006 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 3.610115 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.853242 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 3.282902 &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;"&gt; Gene_b &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.981917 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 2.944475 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.085144 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 3.993367 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.172051 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.435115 &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;"&gt; Gene_c &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.134901 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 2.906727 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 3.657244 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 2.771158 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 3.838969 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 5.041786 &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;"&gt; Gene_d &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.060022 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 3.431809 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 3.067610 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 4.215114 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 3.588607 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 5.006741 &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;"&gt; Gene_e &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 8.375376 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 11.302259 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 9.741597 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 9.374658 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 12.053861 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 10.350153 &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;"&gt; Gene_f &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 10.681901 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 8.988139 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 9.882073 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 10.352955 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 9.145474 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 9.897497 &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;"&gt; Gene_g &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 8.381877 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 10.246497 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 9.182067 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 11.078091 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 10.386456 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 7.507547 &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;"&gt; Gene_h &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 10.374626 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 10.020247 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 9.315545 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 10.949266 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 8.658287 &lt;/td&gt;
&lt;td style="text-align:right;"&gt; 9.715341 &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
Expand Down
Loading

0 comments on commit f159c83

Please sign in to comment.