Source file ⇒ Assignment_2.Rmd

Book Problems

2-7.

  1. There are 16 variables.
  2. There are 336776 cases.
  3. Each case represents the “on-time data for all flights that departed NYC in 2013”
    • year - categorical
    • month - categorical
    • day - categorical
    • dep_time - categorical
    • arr_time - categorical
    • dep_delay - quantitative
    • arr_delay - quantitiative
    • hour - categorical
    • minute - categorical
    • carrier - categorical
    • tailnum - categorical
    • flight - categorical
    • origin - categorical
    • destination - categorical
    • air_time - quantitative
    • distance - quantitative
  4. air_time is measured in minutes and distance is measured in miles.

2-8.

a. Improper syntax for funtion argument

b. No assignment operator

c. Invalid object name

d. Unmatched quotes in character string

e. No mistake

2-10.

3-4.

  1. data table name
    1. function name
    2. variable name
    3. function name
  2. function name
    1. variable name
    2. variable name
    3. function name
  3. variable name
    1. function name
    2. variable name
    3. function name
  4. function name
    1. name of named argument
    2. name of named argument
    3. function name
  5. name of named argument
    1. function name
    2. name of named argument

3-5.

3-6.

  1. does not fit as it takes the mean of count rather than the sum

4-1.

  1. italics

  2. bold

Basics

The Data Set Inv has 2000 cases and 18 variables. Each case can be interpreted as a different item in the library inventory .Some of these variables include where the item is located, the author of the item, the number of times the item has been issued, and more.

The Data Set Bks has 3765 cases and 15 variables. Each case represents a book. These variables include the books author, publisher, publication date, and more.

## Source: local data frame [4 x 2]
## 
##   Current.Status     n
##            (chr) (int)
## 1      AVAILABLE  1866
## 2        MISSING     1
## 3        ON_LOAN    18
## 4      WITHDRAWN   115
## Source: local data frame [46 x 2]
## 
##    Issued.Count     n
##           (int) (int)
## 1             0   996
## 2             1   337
## 3             2   203
## 4             3   121
## 5             4    69
## 6             5    46
## 7             6    38
## 8             7    29
## 9             8    24
## 10            9    20
## ..          ...   ...