diff --git a/Module1_files/figure-html/unnamed-chunk-474-1.png b/Module1_files/figure-html/unnamed-chunk-474-1.png index 6ab9f40..fef1726 100644 Binary files a/Module1_files/figure-html/unnamed-chunk-474-1.png and b/Module1_files/figure-html/unnamed-chunk-474-1.png differ diff --git a/Module1_files/figure-html/unnamed-chunk-478-1.png b/Module1_files/figure-html/unnamed-chunk-478-1.png index 94a52de..0557197 100644 Binary files a/Module1_files/figure-html/unnamed-chunk-478-1.png and b/Module1_files/figure-html/unnamed-chunk-478-1.png differ diff --git a/docs/Module1_files/figure-html/unnamed-chunk-474-1.png b/docs/Module1_files/figure-html/unnamed-chunk-474-1.png index 6ab9f40..fef1726 100644 Binary files a/docs/Module1_files/figure-html/unnamed-chunk-474-1.png and b/docs/Module1_files/figure-html/unnamed-chunk-474-1.png differ diff --git a/docs/Module1_files/figure-html/unnamed-chunk-478-1.png b/docs/Module1_files/figure-html/unnamed-chunk-478-1.png index 94a52de..0557197 100644 Binary files a/docs/Module1_files/figure-html/unnamed-chunk-478-1.png and b/docs/Module1_files/figure-html/unnamed-chunk-478-1.png differ diff --git a/docs/associated-csu-course 2.html b/docs/associated-csu-course 2.html new file mode 100644 index 0000000..5c20a7f --- /dev/null +++ b/docs/associated-csu-course 2.html @@ -0,0 +1,430 @@ + + + + + + + 1.1 Associated CSU Course | R Module 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+
+

1.1 Associated CSU Course

+

This bookdown book is intended to accompany the associated course at Colorado State University, but the curriculum is free for anyone to access and use. +If you’re reading the PDF or EPUB version of this book, you can find the “live” version at https://csu-r.github.io/Module1/, and all of the source files for this book can be found at https://github.com/CSU-R/Module1.

+

If you’re not taking the CSU course, you will periodically encounter instructions and references which are not relevant to you. For example, we will make reference to the Canvas website, which only CSU students enrolled in the course have access to.

+ +
+ +
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + + + diff --git a/docs/course-topics-syllabus 2.html b/docs/course-topics-syllabus 2.html new file mode 100644 index 0000000..f74f376 --- /dev/null +++ b/docs/course-topics-syllabus 2.html @@ -0,0 +1,601 @@ + + + + + + + 2.2 Course Topics & Syllabus | R Module 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+
+

2.2 Course Topics & Syllabus

+

Broadly speaking, the topics of this course are described by the Chapter Titles. Here’s what each entails:

+
    +
  • Course Preliminaries: Introduction to R and the world of R
  • +
  • Installing R: Like it sounds, setting up your computer so you can work with R.
  • +
  • R Programming Fundamentals: The basics of programming in R, the building blocks that you need in order to do anything more interesting.
  • +
  • Working with Data: How to do meaningful things with data sets. Probably the most useful Chapter of the book.
  • +
  • Creating R Programs: More programming concepts to increase your R Power!
  • +
+
+

2.2.1 Syllabus

+

First, some important details:

+
    +
  • Instructor: Lane Drew

  • +
  • Office Hours: Held in the Statistics Success Center (Weber 223A), schedule available on Canvas.

  • +
  • Webpages: Canvas, this textbook

  • +
  • Course Credits: 1. This means ~1 hours of lecture and 4 hours of work outside of lecture per week.

  • +
  • Textbook: You’re reading it right now. The textbook will be your primary learning resource. You’ll be expected to read through the required sections, watch any relevant videos, and complete any reflections, progress checks, and assessments along the way. On days when a quiz is due, you should complete the reading before you take the quiz.

  • +
  • Prerequisites: None

  • +
  • Assignments/What-to-turn-in: This course will be graded on three types of assignments: Progress Checks, Homeworks, and Quizzes. There will be four of each. Most weeks, you will have one of these three types of assignments due. Due dates will be specified on Canvas and assignments will be due at 11:59pm on the indicated day (please see schedule below).

  • +
  • Progress Checks: As you work your way through the textbook, you’ll encounter purple “Progress Check” boxes. For the first Progress Check, you’ll submit your responses directly to Canvas. For Progress Checks 2-4, you’ll fill in an R Markdown document and submit it to canvas. You’ll be provided a template to fill in as you complete the progress checks. To turn in the document, you’ll knit the document to HTML or PDF and upload to Canvas. (More details coming later in the book!). Progress checks will be graded on completion, organization, and correctness. Progress Checks must be turned in by 11:59pm (Mountain) on the day they are due. Half credit will be given for a two-day window after the due date, after which no credit will be possible.

  • +
  • Homework: There are four homeworks during the semester. You’ll complete each homework using R. Homeworks must be turned in by 11:59pm (Mountain) on the day they are due. Half credit will be given for a two-day window after the due date, after which no credit will be possible.

  • +
  • Quizzes: There will be four 15 minute Canvas quizzes during the semester. Quizzes must be completed by 11:59pm (Mountain) on the day they are due. There are NO late quizzes accepted after the due date has passed. If you cannot complete the quiz on the day it is due, you are expected to do it early.

  • +
  • Exams: There will be no exams in this course

  • +
  • Lectures: Lectures will be held on Fridays. There will be mini-lectures, approximately 10-30 minutes. The mini-lectures will be based on previously read material, no new material will be presented. Students are expected to have read the material before the lecture. The reminder of the time will be student-led. We will cover questions students may have or work on homework together.

  • +
  • Grading: The grading for the course is apportioned like so:

    +
      +
    • Progress Checks: 30%
    • +
    • Homework: 40%
    • +
    • Quizzes: 30%
    • +
  • +
+ + + + + + + + + + + + + + + + + + + + +
+
+

2.2.2 Assignment Templates

+

In order to complete the progress checks and course assignments, you’ll need to start from these templates:

+

Progress Checks

+ +

Assignments

+ +
+
+

2.2.3 Course Policies

+
    +
  • Late Work: Homework and Progress Checks must be turned in on time to receive full credit. You may turn in Homework and Progress Checks up to 2 days late for up to 50% credit.
  • +
  • Group Work: Students are welcome to discuss the course with each other, but all work you turn in must be your own. This means no sharing solutions to homework, progress checks, or quizzes. You may not work with other students on quizzes. You are welcome to seek help on Canvas discussion boards and during office hours.
  • +
  • Students with Disabilities: The university is committed to providing support for students with disabilities. If you have an accommodation plan, please provide that to me as soon as possible so we can discuss appropriate arrangements.
  • +
  • Growth Mindset: This phrase was coined by Carol Dweck to reflect how your learning outcomes can be affected by the way you view the learning process. To quote Dweck: “The view you adopt for yourself profoundly affects the way you lead your life… Believing that your qualities are carved in stone - the fixed mindset - creates an urgency to prove yourself over and over. If you have only a certain amount of intelligence, a certain personality, and a certain moral character — well, then you’d better prove that you have a healthy dose of them. It simply wouldn’t do to look or feel deficient in these most basic characteristics… There’s another mindset in which these traits are not simply a hand you’re dealt and have to live with, always trying to convince yourself and others that you have a royal flush when you’re secretly worried it’s a pair of tens. In this mindset, the hand you’re dealt is just the starting point for development. This growth mindset is based on the belief that your basic qualities are things you can cultivate through your efforts. Although people may differ in every which way — in their initial talents and aptitudes, interests, or temperaments — everyone can change and grow through application and experience.” Programming may be a very new, intimidating thing for you. That’s okay! View this course as a way to grow and gain new skills which you can use to do incredible and important things!
  • +
  • Learn by doing: A wise statistics instructor once compared watching someone else solve statistics problems to watching someone else practice shooting basketball free throws. You may learn a little by watching, but at some point you won’t get any better until you try it yourself! The same can be said for programming. Reading a textbook and watching videos are a good start, but you’ll have to actually program in order to get any better! This textbook was designed to be interactive, and I encourage you to “code along with the book” as you read.
  • +
+
+
+

2.2.4 Grading Scale

+

Grades will be assigned according to the following scale:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class.Score + +Letter.Grade +
+92%-100% + +A +
+90%-92% + +A- +
+88%-90% + +B+ +
+82%-88% + +B +
+80%-82% + +B- +
+78%-80% + +C+ +
+70%-78% + +C +
+60%-70% + +D +
+0%-60% + +F +
+ +
+
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + + + diff --git a/docs/getoutoftheclass 2.html b/docs/getoutoftheclass 2.html new file mode 100644 index 0000000..e77e2de --- /dev/null +++ b/docs/getoutoftheclass 2.html @@ -0,0 +1,464 @@ + + + + + + + 2.4 What do you hope to get out of this course? | R Module 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+
+

2.4 What do you hope to get out of this course?

+

To close out this chapter, it would be healthy for you to reflect on what you’d like to get from this course. +Take some time to think through each question below, and write down your answers. +It is fine if your honest answer is I don’t know. +In that case, try to come up with some possible answers that might be true.

+
+
    +
  1. +Why are you taking this course? +
  2. +
  3. +If this course is required for your major, how do you think it is +supposed to benefit you in your studes? +
  4. +
  5. +What types of data sets related to your field of study may require +data analysis? +
  6. +
  7. +What skills do you hope to develop in this course, and how might +they be applied in your major and career? +
  8. +
+
+
+

+Submit your answers to the above reflection to Canvas. This will be +your Progress Check 1. +

+
+

Store your answers in a safe place, and refer to them periodically as you progress through the course. +You may find that you aren’t achieving your goals and that some adjustment to how you are approaching the course may be necessary. +Or you may find that your goals have changed, which is fine! +Just update your goals so that you have something to refer back to.

+ +
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + + + diff --git a/docs/index 2.html b/docs/index 2.html new file mode 100644 index 0000000..a793507 --- /dev/null +++ b/docs/index 2.html @@ -0,0 +1,468 @@ + + + + + + + R Module 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ +
+

Chapter 1 Welcome!

+

Hi, and welcome to the R Module 1 (AKA STAT 158) course at Colorado State University!

+

This course is the first of three 1 credit courses intended to introduce the R programming language to those with little or no programming experience.

+

Through these Modules (courses), we’ll explore how R can be used to do the following:

+
    +
  1. Perform basic computations and logic, just like any other programming language
  2. +
  3. Load, clean, analyze, and visualize data
  4. +
  5. Run scripts
  6. +
  7. Create reproducible reports so you can explain your work in a narrative form
  8. +
+

In addition, you’ll also be exposed to some aspects of the broader R community, including:

+
    +
  1. R as free, open source software
  2. +
  3. The free RStudio IDE
  4. +
  5. Publicly available packages which extend the capability of R
  6. +
  7. Events and community groups which advocate for the use of R and the support of R users
  8. +
+

More detail will be provided in the Course Topics laid out in the next chapter.

+
+

1.0.1 How To Navigate This Book

+To move quickly to different portions of the book, click on the appropriate chapter or section in the the table of contents on the left. +The buttons at the top of the page allow you to show/hide the table of contents, search the book, change font settings, download a pdf or ebook copy of this book, or get hints on various sections of the book. +The faint left and right arrows at the sides of each page (or bottom of the page if it’s narrow enough) allow you to step to the next/previous section. +Here’s what they look like: +
+Left and right navigation arrowsLeft and right navigation arrows +

+Figure 1.1: Left and right navigation arrows +

+
+
+
+
+
+
    +
  1. Department of Statistics, Colorado State University, ↩︎

  2. +
  3. Department of Statistics, Colorado State University, ↩︎

  4. +
+
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + + + diff --git a/docs/index.html b/docs/index.html index e03cbdf..9d39bd3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -344,7 +344,7 @@

R Module 1

Alex Fout1

Lane Drew2

-

10 Jun, 2024, 10:45 AM

+

11 Jun, 2024, 12:38 PM

Chapter 1 Welcome!

diff --git a/docs/install-r-r-studio.html b/docs/install-r-r-studio.html index 0d13e14..8cb885a 100644 --- a/docs/install-r-r-studio.html +++ b/docs/install-r-r-studio.html @@ -357,7 +357,7 @@

3.2.1 Installing R3.2.1.1 Windows

-
Warning: Removed 199 rows containing missing values or values outside the scale
-range (`geom_point()`).
+
Warning: Removed 199 rows containing missing values or
+values outside the scale range (`geom_point()`).

diff --git a/docs/what-is-r 2.html b/docs/what-is-r 2.html new file mode 100644 index 0000000..eacf98d --- /dev/null +++ b/docs/what-is-r 2.html @@ -0,0 +1,535 @@ + + + + + + + 2.5 What is R? | R Module 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +
+ +
+ +
+
+ + +
+
+ +
+
+

2.5 What is R?

+

What is R? This question can be answered several different ways. +Here are a few of them:

+ + + +
+

2.5.1 R is a Programming Language

+

A programming language is a way of providing instructions to a computer. +Some popular languages (in no particular order) are C, C++, Java, Python, PHP, Visual Basic, and Swift. +Much like other types of languages, programming languages combine text and punctuation (syntax) to create statements which provide meaningful instructions (semantics) to be performed by a computer. +These instructions are called “code”. +R code can be used to do many things, but primarily R was designed to easily work with data and produce graphics. +The R language can be used to get a computer to do the following:

+
    +
  • Read and process a set of data in a file or database
  • +
  • Use data to compute statistics and perform statistical tests
  • +
  • Produce nice looking visualizations of data
  • +
  • Save data for others to use. +But this list is just the tip of the iceberg. +As you will see, R can be used to do so much more! +After the instructions are written, the R code is run, that is, the code is provided to the computer, and the computer performs the instructions to produce the desired results.
  • +
+
+

+Many other programming languages use different syntax for the same +purpose. +

+

+# comments out a line in +R and python +

+

+% comments out a line in +matlab +

+

+// comments out a line +in C++ and javascript +

+

+Similar to learning a foreign language, learning your first +programming language will make it easier to understand other similar +ones. +

+
+
+
+

2.5.2 R is software

+

R can also be thought of as the software program which runs R code. +In other words, if R code is the computer language, then the R software is what interprets the language and makes the computer follow the instructions laid out in the code. +This is sometimes called “base R”.

+
+
+

2.5.3 R is Free

+

The R software is free, so anyone can download R, write R code, and run the R code in order to produce results on their computer.

+
+
+

2.5.4 R is Open Source

+

The R software, which runs R code, is also made up of a bunch of code called source code. +In addition to being free, R is also open source, meaning that anyone can look at the source code and understand the “deep-down nuts-and-bolts” of how R works. +In addition, anyone is able to contribute to R, in order to improve it and add new features to it.

+
+

+What are the advantages of open-source software? What are some +potential downsides? +

+

+Why do you think the creators of R decided to make it open +source? +

+
+
+
+

2.5.5 R is an ecosystem

+

Another way of thinking about R is to include not only the R language and the R software, but also the community of R users and programmers, and the various “add on” software they have created for R. +These add on software are called “packages”.

+
+
+

2.5.6 R Packages

+

An R package is software written to extend the capabilities of base R. +R packages are often written in R code, so anyone who knows how to write R code can also create R packages. +The importance of packages cannot be understated. +One of the reasons for the incredible popularity of R is the fact that members from the community can write new packages which enable R to do more. +Sometimes packages are written to help folks in particular disciplines (e.g. psychology, geosciences, microbiology, education) do their jobs better. +Other times, packages are written to extend the capability of R so that people from many disciplines can use them. +R can be used to make web sites, interactive applications, dynamic reproducible reports, and even textbooks (like this one!).

+

The inclusion of R packages, combined with the free and open source nature of R software, has led to the development of an active, diverse, and supportive community of R users who can easily share their code, data, and results with one another.

+
+

+skimr is one example +of a package. It provides a frictionless approach to summary statistics +which conforms to the principle of least surprise, displaying summary +statistics the user can skim quickly to understand their data. +

+
+
+
+

2.5.7 R Interfaces

+

The R software can be run in many different places, including personal computers, remote servers, and websites (as you have seen!). +R works on Windows, macOS, and Linux, and +R can be run using a terminal or command line (if you know what those are), or using a graphical user interface (with buttons you can click and such). +By far one of the most popular ways of using R is with RStudio, which is also free and open source software. +For this course, you’ll be using RStudio.

+ +
+
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + + + diff --git a/docs/working-with-popular-packages.html b/docs/working-with-popular-packages.html index b01c93a..6f5ffde 100644 --- a/docs/working-with-popular-packages.html +++ b/docs/working-with-popular-packages.html @@ -582,8 +582,8 @@

6.4.5 Organizing Your Data With < summarize(n = n(), # Compute number of cars in each group ave_mpg = mean(mpg), # Compute average mpg sd_mpg = sd(mpg)) # Compute standard deviation of mpg

-
`summarise()` has grouped output by 'cyl'. You can override using the
-`.groups` argument.
+
`summarise()` has grouped output by 'cyl'. You can
+override using the `.groups` argument.