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.

Advertisements

2 thoughts on “Computing For Data Analysis Week 1 Overview”

  1. 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).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s