Lab 1 – Requirements
A. Given data in the yearly_request.csv, please complete the following tasks.
1. Import data in .csv file to requests data frame in R
2. Export the histogram of number of requests to jpeg file
3. Add a column per_request to dataset and exports the modified dataset to
“requests_modified.txt” file
4. Extract the second, third, and fourth column of the requests data frame
5. build an empty character vector of the same length as requests and group the customers
according to the request amount
6. Summary of requests
7. Calculate and show total of request value
The result report must be included in a document which has:
- All necessary commands used to do task
- And output screen of command result
B. Write commands
1. Create a vector v contain values from 1 to 50
2. Calculate the total value of all elements in v
3. List all elements which has value greater than 10 and less than 40
4. Create a new vector from vector v. Element value in the new vector is two times of element
value in v
5. Write the code to generate data (with norm = 60, mean = 0, sd = 0.6) and show this data like the below figure