Question: Write a program in R which does the following: 1. Creates a vector, x, of 1000 evenly spaced numbers from 0 to 2Tt 2. Creates

Write a program in R which does the following: 1. Creates a vector, x, of 1000 evenly spaced numbers from 0 to 2Tt 2. Creates a vector, y, consisting of the sine of every value in x 3. Creates a line plot of x (on the x-axis) against y (on the y-axis) with appropriate labelling 4. Adds a red horizontal line at value 0 showing appropriate labelling Comment your code as appropriate. Do not worry about setting a working directory. When you have finished the program, cut and paste it into the box below. Moodle may insert extra line breaks into your code - just leave them as they appear and I will deal with them
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
