You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: part-tools/02-setting-up-computer.qmd
+68-13
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
## What are you asking me to install?
9
9
10
-
It's generally a good idea to be skeptical when someone is telling you to install things.
10
+
It's a good idea to be skeptical when someone is telling you to install things.
11
11
🤨 Here's a very broad overview of what each of these programs or services does and why I'm asking you to install or sign up for them.
12
12
13
13
| Program | Logo | Purpose |
@@ -29,23 +29,37 @@ While some parts of this book are fairly language-agnostic (R and python are bot
29
29
30
30
If you're just trying to learn R, perhaps you don't need to install python or quarto.
31
31
If you're not working with other people, maybe you don't need to install `git`.
32
-
You are welcome to make those executive decisions for yourself, but if you're not sure, you might just want to install the whole toolbox - you'll hopefully learn how to use all of the tools along the way, and it'll be less confusing later if you already have access to all of the tools and don't need to go back and get something else when you need it.
32
+
You are welcome to make those decisions for yourself, but if you're not sure, you might just want to install the whole toolbox - you'll hopefully learn how to use all of the tools along the way, and it'll be less confusing later if you already have access to all of the tools and don't need to go back and get something else when you need it.
33
33
34
34
## Installation Process
35
35
36
36
In this section, I will provide you with links to set up various programs on your own machine.
37
37
If you have trouble with these instructions or encounter an error, post on the class message board or contact me for help.
38
38
39
-
1.Download and run the R installer for your operating system from CRAN:
39
+
1.Install R (and associated tools)
40
40
41
-
- {{< fa brands windows >}} Windows: <https://cran.rstudio.com/bin/windows/base/>
42
-
- {{< fa brands apple >}} Mac: <https://cran.rstudio.com/bin/macosx/>
43
-
- {{< fa brands linux >}} Linux: <https://cran.rstudio.com/bin/linux/> (pick your distribution)
41
+
::: panel-tabset
44
42
45
-
If you are on {{< fa brands windows >}} Windows, you should also install the [Rtools4 package](https://cran.rstudio.com/bin/windows/Rtools/); this will ensure you get fewer warnings later when installing packages.
46
-
47
-
If you are on {{< fa brands apple >}} Mac, you should also install XCode, which is a set of developer tools. You can get it from the App store, but it's better to set yourself up with [Homebrew](https://brew.sh/) and then use homebrew to install XCode. If you prefer a different package manager, that's fine - Homebrew is widely used, but there are other options. Ultimately, you just need to have XCode so that you can compile R packages.
43
+
### {{< fa brands windows >}} Windows
48
44
45
+
1. Get the R installer from CRAN: https://cran.rstudio.com/bin/windows/base/
46
+
47
+
2. Install the Rtools4 package that matches the R version you installed: https://cran.rstudio.com/bin/windows/Rtools/
48
+
For example, if you installed R 4.4.3, you should download RTools 4.4. If you installed R 4.0.1, you should install RTools 4.0.
49
+
50
+
### {{< fa brands apple >}} Mac
51
+
52
+
1. Get the R installer from CRAN: https://cran.rstudio.com/bin/macosx/
53
+
54
+
2. Install XCode - a set of developer tools - so that you can install R packages more easily. There are two ways to do this:
55
+
56
+
a. Get XCode [from the App store directly](https://apps.apple.com/us/app/xcode/id497799835?mt=12) (simple, but you may have to do other things later)
57
+
b. Install [Homebrew](https://brew.sh/) and then use homebrew to install XCode.^[If you prefer a different package manager, that's fine - Homebrew is widely used, but there are other options. Ultimately, you just need to have XCode so that you can compile R packages.]
58
+
59
+
I personally suggest option b, because Homebrew is used for a lot of different software-development related things, and having it will make life easier later.
@@ -55,6 +69,29 @@ brew install mas # Search the apple store
55
69
mas search xcode # find xcode
56
70
mas install 497799835 # install the program by ID
57
71
```
72
+
:::
73
+
74
+
75
+
76
+
### {{< fa brands linux >}} Linux
77
+
78
+
If you're using a distribution derived from Debian, Fedora, RedHat, Suse, or Ubuntu, follow the instructions below.
79
+
80
+
If you don't know your distribution (or if you're working on a derivative distribution, like Mint), you can figure out which set of instructions to follow by executing `lsb_release -a` in your system terminal.
81
+
82
+
If you're using Arch or another distribution that isn't derived from something listed above, google for instructions specific to your distribution - these instructions cover the most common, user-friendly distributions, but if you've chosen something more niche, it is assumed you can figure out how to install R. (If that isn't the case, leave a comment below with your distribution, so I know how best to update this book.)
83
+
84
+
---
85
+
86
+
#### Installation Instructions {-}
87
+
88
+
1. Get the R installer from CRAN: https://cran.rstudio.com/bin/linux/ - pick your distribution, and follow the distribution-specific instructions from there.
89
+
90
+
91
+
You could install R using your package manager, but often this version is out of date. The instructions for each version will get you a more up-to-date version that will be easier to work with.
92
+
93
+
:::
94
+
58
95
59
96
2. Download and install the latest version of [python 3](https://www.python.org/downloads/)
60
97
@@ -96,14 +133,32 @@ If you want to be safe, go ahead and complete these steps as well.
96
133
Open RStudio on your computer and explore a bit.
97
134
98
135
- Can you find the R console? Type in `2+2` to make sure the result is `4`.
99
-
- Run the following code in the R console:
136
+
- Run the following code in the R console to set up some basic packages:
0 commit comments