forked from ucsdlib/intro-to-r
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.Rmd
81 lines (56 loc) · 3.21 KB
/
index.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
---
title: "Intro to R"
output:
dcTemplate::dc_lesson_template:
fig_width: 6
fig_height: 6
highlight: pygments
---
```{r knitr_init, echo = FALSE, cache = FALSE}
library(knitr)
## Global options
options(max.print = "75")
opts_chunk$set(cache = TRUE,
prompt = FALSE,
tidy = TRUE,
comment = "> #",
message = FALSE,
warning = FALSE)
opts_knit$set(width = 75)
```
**Instructors:** Tim Dennis & Reid Otsuji
**Dates:** 10/20 & 11/4
**Time:** 10-noon
**Location:** BLB Classroom 4
**Sponsoring Library Programs:** Research & Reference Advisory – Data Services & Research Data Curation
This is an introduction to R designed for participants with no programming experience. They start with some basic information about R syntax, the RStudio interface, and move through how to import CSV files, the structure of data.frame, how to deal with factors, how to add/remove rows and columns, and finish with how to calculate summary statistics for each level and a very brief introduction to plotting.
**NOTE: This course is largely adapted from the Data Carpentry's R for Ecology lessons <http://www.datacarpentry.org/>.**
## Lessons:
* Intro to R
* Creating functions
* Working with data
<!--
* [Lesson 00 Before We Start] #(00-before-we-start.html) - 15 min
* [Lesson 01 Introduction to R](01-intro-to-R.html) - 45min
* [Lesson 01a Creating functions](http://swcarpentry.github.io/r-novice-inflammation/02-func-R.html)
* [Lesson 02 Starting with Data](02-working-with-data.html) -30min
* [Lesson 04 Introducing `data.frame`](03-data-frames.html) - 30min
-->
## Supplemental lessons
* [Analyzing multiple data sets](http://swcarpentry.github.io/r-novice-inflammation/03-loops-R.html)
* [Making Choices](http://swcarpentry.github.io/r-novice-inflammation/04-cond.html)
## Resources
* [RStudio Keyboard Shortcuts](https://support.rstudio.com/hc/en-us/articles/200711853-Keyboard-Shortcuts)
- Insert assignment operator: windows (Alt+-); mac(Option+-)
- Insert pipe operator: win(Ctrl+Shift+M); mac(Alt+Shift+M)
<!-- * [Instructor's Notes](instr_notes.html) -->
# Setup
## R
[R](http://www.r-project.org) is a programming language that is especially powerful for data exploration, visualization, and statistical analysis. To interact with R, we use [RStudio](http://www.rstudio.com/).
## Windows {#r-windows}
Install R by downloading and running [this .exe file](http://cran.r-project.org/bin/windows/base/release.htm) from [CRAN](http://cran.r-project.org/index.html). Also, please install the [RStudio IDE](http://www.rstudio.com/ide/download/desktop).
## Mac OS X {#r-macosx}
Install R by downloading and running [this .pkg file](http://cran.r-project.org/bin/macosx/R-latest.pkg) from
[CRAN](http://cran.r-project.org/index.html). Also, please install the [RStudio IDE](http://www.rstudio.com/ide/download/desktop).
## Linux {#r-linux}
You can download the binary files for your distribution from [CRAN](http://cran.r-project.org/index.html). Or you can use your package manager (e.g. for Debian/Ubuntu run `sudo apt-get install r-base` and for Fedora run `sudo yum install R`).Also, please install the [RStudio IDE](http://www.rstudio.com/ide/download/desktop).