Skip to content

Commit

Permalink
Small edits for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
abner-hb committed Sep 5, 2024
1 parent 8ddccb2 commit 1aa2388
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 35 deletions.
61 changes: 35 additions & 26 deletions 01_the_r_environment.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ our specific needs.

## Why becoming a useR?

**R** is gratis and it runs on Windows, MacOS, and several Unix platforms. With **R** you can start with a data set like this:
**R** is gratis and runs on Windows, MacOS, and several Unix platforms. With **R** you can start with a data set like this:
```{r loading messy flower data}
#| echo: false
flower_df <- read.table("data_files/flower.csv", header = TRUE, sep = ",")
Expand All @@ -34,22 +34,35 @@ You can also find many powerful tools to fit statistical models
- Generalized linear models (including linear regression)
- Survival analysis
- Time series analysis
- Random and Mixed effects models (aka hierarchical models, aka multilevel
- Multilevel models (aka hierarchical models, aka Random and Mixed effects
models)
- Classification and clustering
- Sample size and power calculations
- Multivariable analysis (e.g., factor analysis, principal component analysis, and structural equations modeling)

Even better, new tools become available in **R** all the time. As with other open source programming languages, everyone can examine and contribute to **R**'s code. Users constantly publish their own code packages to expand **R**'s capabilities. As of March 2019, users have contributed over 13,700 packages to Comprehensive **R** Archive Network (CRAN), many of which perform complex statistical routines that are not (and may never be) available in other statistical software systems.

In Windows, there are several ways to use **R**. The standard **R** graphical unit interface (GUI) allows you to point and click to do many basic tasks. Another GUI is [**R** Commander](https://socialsciences.mcmaster.ca/jfox/Misc/Rcmdr/), developed by
John Fox at McMaster University. **R** Commander displays the underlying **R** code for each analysis to help the user learn the programming language. [Tinn-**R**](http://sourceforge.net/projects/tinn-r/) is another GUI from Jose Claudio Faria.

These GUIs are friendly and easy to grasp if you're a beginner. But to use all of **R**'s capabilities you will need to do more than point and click.

A more complete way of using **R** is through an integrated development environment (IDE), which, in short, helps you code. The most popular IDE for **R** is [**R**Studio](https://www.posit.com), which organizes the
user's screen into panes that display scripts, objects, graphics, and
the **R** console.
- Multivariable analysis (e.g., factor analysis, principal component analysis,
and structural equations modeling)

Even better, new tools become available in **R** all the time. As with other open
source programming languages, everyone can examine and contribute to **R**'s
code. Users constantly publish their own code packages to expand **R**'s
capabilities. As of March 2019, users have contributed over 13,700 packages to
Comprehensive **R** Archive Network (CRAN), many of which perform complex
statistical routines that are not (and may never be) available in other
statistical software systems.

In Windows, there are several ways to use **R**. The standard **R** graphical
unit interface (GUI) allows you to point and click to do many basic tasks.
Another GUI is [**R** Commander](https://socialsciences.mcmaster.ca/jfox/Misc/Rcmdr/), developed by
John Fox at McMaster University. **R** Commander displays the underlying **R**
code for each analysis to help the user learn the programming language.
[Tinn-**R**](http://sourceforge.net/projects/tinn-r/) is another GUI from Jose
Claudio Faria.

These GUIs are friendly and easy to grasp if you're a beginner. But to use all of
**R**'s capabilities you will need to do more than point and click. A more
complete way of using **R** is through an integrated development environment
IDE), which, in short, helps you code. The most popular IDE for **R** is
[**R**Studio](https://www.posit.com), which organizes the user's screen into
panes that display scripts, objects, graphics, and the **R** console.

In these notes, we will use **R**Studio a lot. The goal is for you to start taking full advantage of **R**'s capabilities.

Expand All @@ -65,25 +78,21 @@ original analysis and to investigate other approaches.

## Why Isn't Everyone a Use**R**?

Many users of statistics only learn how to use one statistical software, often the one taught in their first statistics course. In the past, **R** rarely was this first language, but nowadays more schools are teaching how to use it.
Many users of statistics don't use **R** because they only know how to use one statistical software, often the one taught in their first statistics course. In the past, **R** rarely was this first language, but nowadays more schools are teaching how to use it.

Some people have used **R**, but struggles to get comfortable
and productive with it, especially if they had little coding experience. Typing
commands explicitly is more difficult than pointing and clicking. Also, each
package has its own rules to learn. You can find a lot of good help for popular
packages written by professional developers, but not so much for smaller
packages written by other common users. Worst of all, some of the messages **R**
displays if you make a mistake are uninformative, so fixing the problem can be difficult.
Some people have used **R**, but struggle to get comfortable and productive with
it, especially if they had little coding experience. Typing commands explicitly is more difficult than pointing and clicking. Also, each package has its own rules to learn. We can find a lot of good help for popular packages written by professional developers, but not so much for smaller packages written by other common users. Worst of all, some of the messages **R** displays if we make a mistake are uninformative, so fixing the problem can be difficult.

Don't get frustrated! You don't have to be an expert programmer to use
**R**. The benefits are worth spending some time up front.

## Suggestions for Learning **R**

- Learn interactively! Retype and experiment with lots of sample code; you won't break it. These notes contain many code examples and you can find many more online.
- Don't worry about getting errors. Even experienced **R** users
make mistakes all the time. And you can learn a lot from error
messages.
- Learn interactively! Retype and experiment with lots of sample code; you won't
break it. These notes contain many code examples and you can find many more
online.
- Don't worry about getting errors. Even experienced **R** users make mistakes
all the time. And you can learn a lot from error messages.
- Ask other **R** users for help.
- Some useful links are:
- <https://www.r-project.org>: The **R** Home page, the
Expand Down
11 changes: 5 additions & 6 deletions docs/01_the_r_environment.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ <h1 class="title"><span class="chapter-number">1</span>&nbsp; <span class="chapt
<p><strong>R</strong> is an environment for statistical modeling and graphics. That it is an <em>environment</em> instead of a <em>package</em> is one of the main reasons why <strong>R</strong> is distinct from other statistical programs. A package only gives us a fixed set of tools. An environment allows us to modify, combine and even create tools to suit our specific needs.</p>
<section id="why-becoming-a-user" class="level2" data-number="1.1">
<h2 data-number="1.1" class="anchored" data-anchor-id="why-becoming-a-user"><span class="header-section-number">1.1</span> Why becoming a useR?</h2>
<p><strong>R</strong> is gratis and it runs on Windows, MacOS, and several Unix platforms. With <strong>R</strong> you can start with a data set like this:</p>
<p><strong>R</strong> is gratis and runs on Windows, MacOS, and several Unix platforms. With <strong>R</strong> you can start with a data set like this:</p>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code> treat nitrogen block height weight leafarea shootarea flowers
Expand All @@ -212,15 +212,14 @@ <h2 data-number="1.1" class="anchored" data-anchor-id="why-becoming-a-user"><spa
<li>Generalized linear models (including linear regression)</li>
<li>Survival analysis</li>
<li>Time series analysis</li>
<li>Random and Mixed effects models (aka hierarchical models, aka multilevel models)</li>
<li>Multilevel models (aka hierarchical models, aka Random and Mixed effects models)</li>
<li>Classification and clustering</li>
<li>Sample size and power calculations</li>
<li>Multivariable analysis (e.g., factor analysis, principal component analysis, and structural equations modeling)</li>
</ul>
<p>Even better, new tools become available in <strong>R</strong> all the time. As with other open source programming languages, everyone can examine and contribute to <strong>R</strong>’s code. Users constantly publish their own code packages to expand <strong>R</strong>’s capabilities. As of March 2019, users have contributed over 13,700 packages to Comprehensive <strong>R</strong> Archive Network (CRAN), many of which perform complex statistical routines that are not (and may never be) available in other statistical software systems.</p>
<p>In Windows, there are several ways to use <strong>R</strong>. The standard <strong>R</strong> graphical unit interface (GUI) allows you to point and click to do many basic tasks. Another GUI is <a href="https://socialsciences.mcmaster.ca/jfox/Misc/Rcmdr/"><strong>R</strong> Commander</a>, developed by John Fox at McMaster University. <strong>R</strong> Commander displays the underlying <strong>R</strong> code for each analysis to help the user learn the programming language. <a href="http://sourceforge.net/projects/tinn-r/">Tinn-<strong>R</strong></a> is another GUI from Jose Claudio Faria.</p>
<p>These GUIs are friendly and easy to grasp if you’re a beginner. But to use all of <strong>R</strong>’s capabilities you will need to do more than point and click.</p>
<p>A more complete way of using <strong>R</strong> is through an integrated development environment (IDE), which, in short, helps you code. The most popular IDE for <strong>R</strong> is <a href="https://www.posit.com"><strong>R</strong>Studio</a>, which organizes the user’s screen into panes that display scripts, objects, graphics, and the <strong>R</strong> console.</p>
<p>These GUIs are friendly and easy to grasp if you’re a beginner. But to use all of <strong>R</strong>’s capabilities you will need to do more than point and click. A more complete way of using <strong>R</strong> is through an integrated development environment IDE), which, in short, helps you code. The most popular IDE for <strong>R</strong> is <a href="https://www.posit.com"><strong>R</strong>Studio</a>, which organizes the user’s screen into panes that display scripts, objects, graphics, and the <strong>R</strong> console.</p>
<p>In these notes, we will use <strong>R</strong>Studio a lot. The goal is for you to start taking full advantage of <strong>R</strong>’s capabilities.</p>
<!--
Expand All @@ -233,8 +232,8 @@ <h2 data-number="1.1" class="anchored" data-anchor-id="why-becoming-a-user"><spa
</section>
<section id="why-isnt-everyone-a-user" class="level2" data-number="1.2">
<h2 data-number="1.2" class="anchored" data-anchor-id="why-isnt-everyone-a-user"><span class="header-section-number">1.2</span> Why Isn’t Everyone a Use<strong>R</strong>?</h2>
<p>Many users of statistics only learn how to use one statistical software, often the one taught in their first statistics course. In the past, <strong>R</strong> rarely was this first language, but nowadays more schools are teaching how to use it.</p>
<p>Some people have used <strong>R</strong>, but struggles to get comfortable and productive with it, especially if they had little coding experience. Typing commands explicitly is more difficult than pointing and clicking. Also, each package has its own rules to learn. You can find a lot of good help for popular packages written by professional developers, but not so much for smaller packages written by other common users. Worst of all, some of the messages <strong>R</strong> displays if you make a mistake are uninformative, so fixing the problem can be difficult.</p>
<p>Many users of statistics don’t use <strong>R</strong> because they only know how to use one statistical software, often the one taught in their first statistics course. In the past, <strong>R</strong> rarely was this first language, but nowadays more schools are teaching how to use it.</p>
<p>Some people have used <strong>R</strong>, but struggle to get comfortable and productive with it, especially if they had little coding experience. Typing commands explicitly is more difficult than pointing and clicking. Also, each package has its own rules to learn. You can find a lot of good help for popular packages written by professional developers, but not so much for smaller packages written by other common users. Worst of all, some of the messages <strong>R</strong> displays if you make a mistake are uninformative, so fixing the problem can be difficult.</p>
<p>Don’t get frustrated! You don’t have to be an expert programmer to use <strong>R</strong>. The benefits are worth spending some time up front.</p>
</section>
<section id="suggestions-for-learning-r" class="level2" data-number="1.3">
Expand Down
Loading

0 comments on commit 1aa2388

Please sign in to comment.