Vector attributes
Load data to your workspace by executing
source("http://www3.nd.edu/~steve/computing_with_data_2014/3_Vectors/work_along_data_S3.R")
- What is the length of x?
- What is the class of x?
- What is the name of the 4th entry in x?
- What are the mean, median and 3rd quartile of x?
Logical vectors
- What are the possible values for an entry of y?
- How many of each value are there?
- How many entries in x are less than 0?
Subsetting
- Form a new vector of all entries in x greater than the median.
Missing data
(Motivating example)
- What is the sum of v1?
- What is the sum of v2?