## R Exercises – 41-50 – Working with Time Series Data

1. Simple time series plot on ‘non-ts’ data a. Get 200 random numbers and call the object ‘mydata’. Let’s set a seed of 14 for reproducibility. b. Get a time series plot without converting to class ‘ts’. c. Add ablines to the chart to indicate the horizontal boundaries of 0 and 1. 2. Working with ‘xts’ a. Get and load

## R Exercises – 31-40 – Data Frame Manipulations

1. Working with the ‘mtcars’ dataset a. Get a histogram of the ‘mpg’ values of ‘mtcars’. Which bin contains the most observations? b. Are there more automatic (0) or manual (1) transmission-type cars in the dataset? Hint: ‘mtcars’ has 32 observations. c. Get a scatter plot of ‘hp’ vs ‘weight’. 2. Working with the ‘iris’ dataset

## R Exercises – 21-30 – The Apply Family of Functions

1. Function ‘apply’ on a simple matrix: a. Get the following matrix of 5 rows and call it ‘mymatrix’ b. Get the mean of each row c. Get the mean of each column d. Sort the columns in ascending order 2. Using ‘lapply’ on a data.frame ‘mtcars’ a. Use three ‘apply’ family functions to get the minimum values

## Famous and Very Useful Pre-Installed Exercise Datasets in R

As most of you surely know, R has many exercise datasets already installed. That simply means, as soon as you installed R Base, which includes the library ‘datasets’, you have ample opportunity to explore R with real world data frames. For me as course content creator those datasets help tremendously, because with them I can