Reference no: EM133007661
1. Data Wrangling exercises
For these tasks you need to install and upload "tidyverse" package:
1. Download the Lab5.txt file and save it to your working directory. Read the file with appropriate read function and store the data in an object considering:
A. The "|" is separation character
B. The first row is not part of data
C. A comment line starts with "#"
D. Print the object and mention its type (Tible or a dataframe) and why?
E. Use appropriate function to convert values to numeric type
F. Add a "sum" column to the existing data structure and calculate sum of values in each row (for each Case Type)
2. Load the diamonds dataset :
A. Create a subset that contains 3 variables (x, y, z)
B. Order the rows by x*y*z in descending order.
C. Filter the data set and create a new dataframe that contains the first 20 rows from part B.
3. Load diamonds dataset:
A. Replace values of y that are less than 3 or more than 20 with ‘missing values' (NA).
B. Draw a histogram for the values of "y" in dataframe created in part A.