Skip to content

Commit

Permalink
Updated to address issue with assignment templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanedrew committed Jun 13, 2024
1 parent 5bf0739 commit 0f81fc9
Show file tree
Hide file tree
Showing 11 changed files with 196 additions and 27 deletions.
Binary file modified Module1_files/figure-html/unnamed-chunk-474-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 modified Module1_files/figure-html/unnamed-chunk-478-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 17 additions & 16 deletions _bookdown.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
book_filename: "Module1"
delete_merged_file: true
language:
ui:
chapter_name: "Chapter "
before_chapter_script: "rscripts/before_chapter.r"
rmd_files:
- "index.Rmd"
- "src/02-CoursePreliminaries.Rmd"
- "src/03-InstallingR.Rmd"
- "src/04-RProgrammingFundamentals.Rmd"
- "src/05-WorkingWithData.Rmd"
- "src/06-PerformingEffectiveDataAnalysis.Rmd"
output_dir: "docs"
# rmd_subdir: ["src"] # misses index.Rmd if we use this
# clean: ["src/book.bib"] # removes book.bib file when cleaned
book_filename: "Module1"
delete_merged_file: true
language:
ui:
chapter_name: "Chapter "
before_chapter_script: "rscripts/before_chapter.r"
rmd_files:
- "index.Rmd"
- "src/02-CoursePreliminaries.Rmd"
- "src/03-InstallingR.Rmd"
- "src/04-RProgrammingFundamentals.Rmd"
- "src/05-WorkingWithData.Rmd"
- "src/06-PerformingEffectiveDataAnalysis.Rmd"
output_dir: "docs"
ignore: ["assignment_templates/*"]
# rmd_subdir: ["src"] # misses index.Rmd if we use this
# clean: ["src/book.bib"] # removes book.bib file when cleaned
Binary file modified docs/Module1_files/figure-html/unnamed-chunk-474-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 modified docs/Module1_files/figure-html/unnamed-chunk-478-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 docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ <h1>
<h1 class="title">R Module 1</h1>
<p class="author"><em>Alex Fout<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a></em></p>
<p class="author"><em>Lane Drew<a href="#fn2" class="footnote-ref" id="fnref2"><sup>2</sup></a></em></p>
<p class="date"><em>11 Jun, 2024, 12:38 PM</em></p>
<p class="date"><em>13 Jun, 2024, 10:33 AM</em></p>
</div>
<div id="welcome" class="section level1 hasAnchor" number="1">
<h1><span class="header-section-number">Chapter 1</span> Welcome!<a href="index.html#welcome" class="anchor-section" aria-label="Anchor link to header"></a></h1>
Expand Down
168 changes: 168 additions & 0 deletions docs/reference-keys 2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
fig:unnamed-chunk-1
fig:unnamed-chunk-9
fig:unnamed-chunk-12
fig:unnamed-chunk-34
fig:unnamed-chunk-35
fig:unnamed-chunk-36
fig:unnamed-chunk-49
fig:unnamed-chunk-323
fig:unnamed-chunk-325
fig:unnamed-chunk-326
fig:unnamed-chunk-327
welcome
how-to-navigate-this-book
associated-csu-course
prelim
this-textbook
special-boxes
how-this-book-displays-code
next-steps
course-topics-syllabus
syllabus
assignment-templates
course-policies
grading-scale
running-your-first-r-code
getoutoftheclass
what-is-r
r-is-a-programming-language
r-is-software
r-is-free
r-is-open-source
r-is-an-ecosystem
r-packages
r-interfaces
the-r-community
places-to-get-help-if-youre-a-student-taking-this-class-for-credit
places-to-get-help-anyone
installing-r
computer-basics
operating-systems
files-directory-structures
downloads-and-installations
install-r-r-studio
installing-r-1
windows
macos
linux
conclusion
installing-rstudio
windows-1
macos-1
conclusion-1
successfull-installation
running-code-in-rstudio
the-r-console
r-scripts
same-examples-on-your-computer
r-markdown
workspace-setup
recommended-settings
setting-working-directory
create-rstudio-project-and-directories-for-class
create-rstudio-project
create-directory-structure
video
set
some-useful-commands-you-should-know
r-programming-fundamentals
programming-preliminaries
r-commands
comments
blank-lines
case
section
section-1
data-types
numeric
integer
character
logical
data-structures
vectors
accessing-and-changing-elements
working-with-vectors
vectors-of-different-types
special-numeric-vectors
another-data-type-factor
combining-vectors
type-conversion
matrices
lists
lists-and-vectors
lists-of-vectors
data-frames
r-objects
everything-is-an-object-in-r
assigning-objects
attributes
null-objects
removing-objects
working-with-data
quick-example
reading-writing-data
olympic-athletes-example
locating-your-data-set
reading-csv-files
writing-csv-files
summary-statistics
quantitative-variables
categorical-variables
saving-an-rdata-file
data-formatting
raw-data-vs.-clean-data.
indexing
vectors-1
matrices-1
lists-1
data-frames-1
advanced-indexing
logical-based-indexing
negative-indexing
nested-indexing-13
visualization
one-quantitative-variable
two-quantitative-variables
one-categorical-variable
two-categorical-variables
multiple-plots
other-types-of-plots
scatterplot-matrix
surfaces
saving-images
rcode
rstudio-plot-window
rmarkdown
plotting-wrap-up
vignettes
flood-analysis-example
map
installing-and-using-packages
downloading-the-data
explore-the-data-structure
explore-the-data
analyze-the-data
performing-effective-data-analysis
basic-control-flow
loops
nested-loops
breaking-out-of-for-loops.
if-statements
else
breaking-out-of-for-loops.-1
formatting-conventions
writing-functions
the-components-of-a-function
writing-a-function
using-functions-for-data-analysis
function-scope
advanced-control-flow
applying-over-multiple-dimensions
applying-over-data-frame-groups
working-with-popular-packages
what-is-a-package
how-do-i-use-packages
finding-and-using-package-help.
making-beautiful-plots-with-ggplot2
organizing-your-data-with-dplyr
working-with-character-strings-with-stringr
2 changes: 1 addition & 1 deletion docs/search_index.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/vignettes.html
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,11 @@ <h4><span class="header-section-number">5.7.1.5</span> Explore the data<a href="
<pre class="output-style"><code> Date q_cfs
Min. :2010-10-01 Min. : 1.31
1st Qu.:2014-03-04 1st Qu.: 22.90
Median :2017-08-05 Median : 62.35
Mean :2017-08-05 Mean : 222.52
3rd Qu.:2021-01-06 3rd Qu.: 147.00
Max. :2024-06-10 Max. :7150.00 </code></pre>
<p>It looks like we have data from 2010 to 2024-06-11 and a range in river
Median :2017-08-06 Median : 62.40
Mean :2017-08-06 Mean : 222.74
3rd Qu.:2021-01-08 3rd Qu.: 147.00
Max. :2024-06-12 Max. :7150.00 </code></pre>
<p>It looks like we have data from 2010 to 2024-06-13 and a range in river
flow (q_cfs) from 2.6 cfs all the way up to 7150 cfs. If you’re a hydrologist,
hopefully these flow numbers look right, but another way to check to make sure
is to simply plot the data as we do below.</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/workspace-setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ <h3><span class="header-section-number">3.5.4</span> Some useful commands you sh
<div class="sourceCode" id="cb8"><pre class="sourceCode r chunk-style"><code class="sourceCode r"><span id="cb8-1"><a href="workspace-setup.html#cb8-1" tabindex="-1"></a><span class="fu">rm</span>(<span class="at">list =</span> <span class="fu">ls</span>()) <span class="co"># Clear everything in your workspace</span></span>
<span id="cb8-2"><a href="workspace-setup.html#cb8-2" tabindex="-1"></a><span class="fu">gc</span>() <span class="co"># Perform garbage collection</span></span></code></pre></div>
<pre class="output-style"><code> used (Mb) gc trigger (Mb) limit (Mb) max used (Mb)
Ncells 879268 47.0 1675977 89.6 NA 1322192 70.7
Vcells 1630663 12.5 8388608 64.0 102400 2584202 19.8</code></pre>
Ncells 879272 47.0 1676008 89.6 NA 1322144 70.7
Vcells 1630670 12.5 8388608 64.0 102400 2591288 19.8</code></pre>
<p>You might also want to clear the R console, which you can do by placing your cursor in the R console and typing <code>&lt;control&gt; l</code> (careful! that’s a lowercase L).</p>
<div class="bonus">
<p>
Expand Down
4 changes: 2 additions & 2 deletions docs/writing-functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,15 @@ <h3><span class="header-section-number">6.2.1</span> The Components Of A Functio
stop(&quot;&#39;decreasing&#39; must be a length-1 logical vector.\nDid you intend to set &#39;partial&#39;?&quot;)
UseMethod(&quot;sort&quot;)
}
&lt;bytecode: 0x11a66a380&gt;
&lt;bytecode: 0x14be3cca8&gt;
&lt;environment: namespace:base&gt;</code></pre>
<p>Now, there are some things in this output that may be confusing and that we won’t explain in this book, but at least some of the output should look like R code to you!
Here’s another example, the <code>mean</code> function:</p>
<div class="sourceCode" id="cb517"><pre class="sourceCode r chunk-style"><code class="sourceCode r"><span id="cb517-1"><a href="writing-functions.html#cb517-1" tabindex="-1"></a><span class="co"># View the code of the mean function (or so we think)</span></span>
<span id="cb517-2"><a href="writing-functions.html#cb517-2" tabindex="-1"></a>mean</span></code></pre></div>
<pre class="output-style"><code>function (x, ...)
UseMethod(&quot;mean&quot;)
&lt;bytecode: 0x11b948678&gt;
&lt;bytecode: 0x12c8f9c78&gt;
&lt;environment: namespace:base&gt;</code></pre>
<p>This example doesn’t seem to have as much R code in it, so where is the code for this function?
The answer is that both <code>sort</code> and <code>mean</code> (and many other R functions) are written in a <em>different</em> programming language, C, which isn’t human readable once it’s compiled.
Expand Down

0 comments on commit 0f81fc9

Please sign in to comment.