forked from gge-ucd/R-DAVIS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
computer_setup.Rmd
161 lines (110 loc) · 10.8 KB
/
computer_setup.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
title: "Computer Software Setup"
---
<br>
Welcome! There's a few things we'd like everyone to try and get sorted out *before* our first class.
Our goal is for you to learn how to use these tools so you can get stuff done. You can learn to be an expert later. Mainly, we'd like you know that computer programming or coding doesn't have to make you feel like this:
```{r, out.width = "350px", fig.align='center', echo=F}
knitr::include_graphics("img/woodybewildered.gif")
#knitr::include_graphics("img/firstPants_thenShoes.jpg")
```
<br>
### Please complete these 4 main tasks before our first class:
1. <i class="fa fa-github fa-2x" aria-hidden="true"></i> Install [**`git`**](https://git-scm.com/downloads) & register for a free [**github** account](https://github.com/) with your `.edu` email address
- **IMPORTANT NOTE**: When installing **git** on your computer, please do not change the installation location! The default installation location is what you want, and if during the installation you click something like "Change Install Location", it will mess everything up
2. <img src="img/R_logo.png" alt="R" width = "6%"> Install *current* [**R**](https://cran.rstudio.com/) on your laptop
3. <img src="img/Rstudio_icon.png" alt="RStudio" width = "6%"> Install *current* [**RStudio**](https://www.rstudio.com/products/rstudio/download/) on your laptop
4. <i class="fa fa-table fa-2x" aria-hidden="true"></i> Make sure you have a spreadsheet program installed on your computer (Microsoft Office, Libre Office, etc.)
Read below for more detailed information on installing the pieces of software we'll need, and platform specific instructions.
<br>
## `Git` & **Github** Account
Much of the instruction below is from a great website set up by Jenny Bryan, called *happygitwithr.com*.
1. **[Register for a free individual GitHub account](https://github.com/)** with your "`@ucdavis.edu`" email, and [request the Student Developer Pack](https://education.github.com/pack). This will give you unlimited private repositories, among other goodies. Do this ASAP! I think a human vets these requests, so don’t delay making this request. Think a little bit about your username and public profile, I suggest you use a real name and begin to build a scholarly identity in social media and coding, but it’s your decision.
2. Tell us your GitHub username using this [Google Form](https://docs.google.com/forms/d/e/1FAIpQLSe_D7-c4aczV1YZ12tNk-tNO8Rb8sZSuFTfox6Y4UnYB42v1Q/viewform?gxids=7757), so we can add you to the class Github Organization, **ucd-cepb** (which is basically our own github "classroom"). We will set up a private repository for each student. So you just need the free individual account (i.e. we don’t have to wait for your Student Developer Pack to get approved).
3. Please look for an invitation to join the [UCD-CEPB Organization](https://github.com/ucd-cepb) in your email. Once that's all done, we can create and add a private **repo**sitory that belongs only to you. Other students can see this repo, but they cannot edit it. The rest of the world cannot see it, only our class.
4. Setup [**git** on your computer](http://happygitwithr.com/install-git.html). The **~** is a shortcut, and it means your home directory (i.e., **~** = `/Users/myname` on a Mac, **~** = `C:/myname/Documents` on a PC).
`r emojifont::emoji("nut_and_bolt")` *__More about repositories and clones__: The __repository__ is a version controlled-project where the `master` copy lives online on Github. All your changes will get committed and pushed up to that repository. A __clone__ is your `local` copy of the repository (on your computer). You can do whatever you want to your `local` copy, making changes/edits, adding files, etc. and `push` those changes back to the `master` repository on github. The cool thing is you can completely delete your `local` copy (assuming you've already committed/pushed any changes that were important), and the `master` will still persist on github, including a record of all the changes you've made.*
## R & RStudio
**R** and **RStudio** are separate downloads and installations. **R** is the underlying statistical computing environment. **RStudio** is a graphical integrated development environment (IDE) that makes using R much easier and more interactive. You need to install `R` before you install **RStudio**. Download and install both of these but in this order:
1. [**R**](http://cran.rstudio.com/): Get the most current version version appropriate for your machine. It's free.
2. [**RStudio**](http://www.rstudio.com/products/rstudio/download/) is a great platform to work with R (note you need R before you can use RStudio). Please install the most recent version. It's free. It does lots of cool things. We'll talk more about it in class.
### Windows
#### If you already have `R` and `RStudio` installed
* Open `RStudio`, and click on *Help* > *Check for updates*. If a new version is
available, quit `RStudio`, and download the latest version for `RStudio`.
* To check which version of `R` you are using, start `RStudio` and the first thing
that appears in the console indicates the version of `R` you are
running. Alternatively, you can type `sessionInfo()`, which will also display
which version of `R` you are running. Go on
the [CRAN website](https://cran.r-project.org/bin/windows/base/) and check
whether a more recent version is available. If so, please download and install
it. You can [check here](https://cran.r-project.org/bin/windows/base/rw-FAQ.html#How-do-I-UNinstall-R_003f) for
more information on how to remove old versions from your system if you wish to do so.
#### If you don't have `R` and `RStudio` installed
* Download `R` from
the [CRAN website](http://cran.r-project.org/bin/windows/base/release.htm).
* Run the `.exe` file that was just downloaded
* Go to the [RStudio download page](https://www.rstudio.com/products/rstudio/download/#download)
* Under *Installers* select **RStudio x.yy.zzz - Windows
XP/Vista/7/8** (where x, y, and z represent version numbers)
* Double click the file to install it
* Once it's installed, open `RStudio` to make sure it works and you don't get any
error messages.
### macOS
#### If you already have R and RStudio installed
* Open `RStudio`, and click on "Help" > "Check for updates". If a new version is
available, quit `RStudio`, and download the latest version for `RStudio`.
* To check the version of R you are using, start `RStudio` and the first thing
that appears on the terminal indicates the version of `R` you are running. Alternatively, you can type `sessionInfo()`, which will also display which version of `R` you are running. Go on
the [CRAN website](https://cran.r-project.org/bin/macosx/) and check
whether a more recent version is available. If so, please download and install
it.
#### If you don't have R and RStudio installed
* Download `R` from
the [CRAN website](http://cran.r-project.org/bin/macosx).
* Select the `.pkg` file for the latest `R` version
* Double click on the downloaded file to install `R`
* It is also a good idea to install [XQuartz](https://www.xquartz.org/) (needed
by some packages)
* Go to the [RStudio download page](https://www.rstudio.com/products/rstudio/download/#download)
* Under *Installers* select **RStudio x.yy.zzz - Mac OS X 10.6+ (64-bit)**
(where x, y, and z represent version numbers)
* Double click the file to install `RStudio`
* Once it's installed, open `RStudio` to make sure it works and you don't get any
error messages.
### Linux
* Follow the instructions for your distribution
from [CRAN](https://cloud.r-project.org/bin/linux), they provide information
to get the most recent version of `R` for common distributions. For most
distributions, you could use your package manager (e.g., for Debian/Ubuntu run
`sudo apt-get install r-base`, and for Fedora `sudo yum install R`), but we
don't recommend this approach as the versions provided by this are
usually out of date. In any case, make sure you have at least `R 3.4.3`
* Go to the
[RStudio download page](https://www.rstudio.com/products/rstudio/download/#download)
* Under *Installers* select the version that matches your distribution, and
install it with your preferred method (e.g., with Debian/Ubuntu `sudo dpkg -i
rstudio-x.yy.zzz-amd64.deb` at the terminal).
* Once it's installed, open `RStudio` to make sure it works and you don't get any
error messages.
## Spreadsheet program
To interact with spreadsheets, we can use LibreOffice, Microsoft Excel, Gnumeric, OpenOffice.org, or other programs. Commands may differ a bit between programs, but general ideas for thinking about spreadsheets are the same.
If you don't have a spreadsheet program already, you can use LibreOffice. It's a free, open source spreadsheet program. Alternatively, as a UC Davis student, you are eligible for a free copy of Microsoft Office 365. See [here for instructions](http://officedownload.ucdavis.edu/), make sure to login with your UC Davis email address.
### Windows
- Download the Installer
- Install LibreOffice by going to [the installation page](https://www.libreoffice.org/download/libreoffice-fresh/). The version for Windows should automatically be selected. Click Download Version X.X.X (whichever is the most recent version). You will go to a page that asks about a donation, but you don't need to make one. Your download should begin automatically.
- Install LibreOffice
- Once the installer is downloaded, double click on it and LibreOffice should install.
### Mac OS X
- Download the Installer
- Install LibreOffice by going to [the installation page](https://www.libreoffice.org/download/libreoffice-fresh/). The version for Mac should automatically be selected. Click Download Version X.X.X (whichever is the most recent version). You will go to a page that asks about a donation, but you don't need to make one. Your download should begin automatically.
- Install LibreOffice
- Once the installer is downloaded, double click on it and LibreOffice should install.
### Linux
- Download the Installer
- Install LibreOffice by going to [the installation page](https://www.libreoffice.org/download/libreoffice-fresh/). The version for Linux should automatically be selected. Click Download Version X.X.X (whichever is the most recent version). You will go to a page that asks about a donation, but you don't need to make one. Your download should begin automatically.
- Install LibreOffice
- Once the installer is downloaded, double click on it and LibreOffice should install.
<br>
<br>
These setup instructions are adapted from those written for [Data Carpentry: R for Data Analysis and Visualization of Ecological Data](http://www.datacarpentry.org/R-ecology-lesson/) and [Data Carpentry: Data Organization in Spreadsheets](http://www.datacarpentry.org/spreadsheet-ecology-lesson/), and from Jenny Bryan's [happygitwithr.com](http://happygitwithr.com/) website.