# Videos for Learning R

All of the videos from the Computing from Data Analysis Coursera course are available on Youtube. If you are interested in learning R or just need a refresher on some of the topics, these videos could serve as a great resource.

• Week 1 installing R, data types, reading/writing files
• Week 2 functions, apply, sapply, other *apply functions
• Week 3 plotting, simulation, graphics, lattice
• Week 4 plotting, regular expressions, and date/time

# Computing For Data Analysis Week 1 Overview

Week 1 of the Computing for Data Analysis course focused mostly on getting R and RStudio installed. Then it focused on some of the basics of the R language. Here are some of the topics

• History of R
• How to get help `help()`
• Data types in R
• numeric (real numbers)
• character (strings)
• integer (counting numbers)
• complex (imaginary)
• logical (TRUE/FALSE)
• Groupings of data
• vector (all the same data type) ``` v <- c(1.4, 2.5, 1.7) v <- 1:10```
• list (NOT all same data type)``` lst <- list("a", 3.5, TRUE, "word", 4+5i)```
• matrix (2-dimensional vector)``` m <- matrix(1:20, nrow=4, ncol=5)```
• Factor is for categorical data``` f <- factor(c("big","small","big","big")) table(f)```
• Missing Values
• NaN `is.nan()` (Not a Number)
• NA `is.na()` (Not Available)
• Reading/Writing data``` d <- read.table("file.txt") d <- read.csv("file.csv") write.table("outFile.txt") ```
• Better Reading data``` initial <- read.csv("data.csv", nrow=10) classes <- sapply(initial, class) fullData <- read.csv("data.csv", nrow=2000, colClasses=classes)```
• The `str()` function for displaying information about the structure of an object

If you hurry, there still might be time to enroll in the class and finish the homework for full credit. Week 1 was not too intensive.