# 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. Creator of Data Science 101

View all posts by Ryan Swanstrom

### 2 Comments on “Computing For Data Analysis Week 1 Overview”

1. Ivan Brusic says:

I took this course the first time it was offered.

If you are a full-time developer, then you will find the course extremely easy. The course is more of an introduction to R and very little on data analysis. R excels at data analysis, so all the example used involve data sets.

Dr. Peng is a great teacher. Enjoyed his lectures and the four week course was just right (for my busy schedule).

1. Ryan Swanstrom says:

So far, I would agree with your assessment. I have not used R for about 6 years, so it is a good refresher, and I am even learning new stuff.

Thanks,
Ryan