Instructions:
Your task is to choose one dataset, then study the data and its associated description of the data (i.e. “data dictionary”). You should take the data, and create an R data frame with a subset of the columns (and if you like rows) in the dataset.


Data Set Information:

The original dataset is available here.

The NASA data set comprises different size NACA 0012 airfoils at various wind tunnel speeds and angles of attack. The span of the airfoil and the observer position were the same in all of the experiments.

Dataset Donor: Dr Roberto Lopez robertolopez ‘@’ intelnics.com Intelnics

Creators: Thomas F. Brooks, D. Stuart Pope and Michael A. Marcolini NASA

This file has the variables:

  1. Frequency, in Hertzs.
  2. Angle of attack, in degrees.
  3. Chord length, in meters.
  4. Free-stream velocity, in meters per second.
  5. Suction side displacement thickness, in meters.
  6. Scaled sound pressure level, in decibels. This is the only output.

Pull the data from the UCI Machine Learning Repository:

a_Url <- "http://archive.ics.uci.edu/ml/machine-learning-databases/00291/airfoil_self_noise.dat"
foil_data <- read.table(file = a_Url, header = FALSE)

Name the columns and convert the table to a dataframe:

colnames(foil_data) <- c("freq","angle","chord_len","fs_vel","thickness","level")
foil_data <- data.frame(foil_data)
class(foil_data)
## [1] "data.frame"
head(foil_data)
##   freq angle chord_len fs_vel  thickness   level
## 1  800     0    0.3048   71.3 0.00266337 126.201
## 2 1000     0    0.3048   71.3 0.00266337 125.201
## 3 1250     0    0.3048   71.3 0.00266337 125.951
## 4 1600     0    0.3048   71.3 0.00266337 127.591
## 5 2000     0    0.3048   71.3 0.00266337 127.461
## 6 2500     0    0.3048   71.3 0.00266337 125.571

Create a subset of columns in the dataset.

output <- foil_data[,6]
output[1:10]
##  [1] 126.201 125.201 125.951 127.591 127.461 125.571 125.201 123.061
##  [9] 121.301 119.541