In: Statistics and Probability
<<Using R code>>
Set seed nuumber as 12345" every time you generate random numbers.
For each anser,
use # to explain if necessary.
3. Use data "thusen" in ibrary ISwR"
3-1) Remove missing observations in the data, name this set as
thu1, and print the first 6
and last 6 observations.
3-2) Rename a variable "short.velocity" -> "x", "blood.glucose"
-> "y".
3-3) Draw a scatter plot for "y" by "x", give title "velocity
vs.glucose". Put tick marks of x-axis
at x=1.0, 1.25, 1.5, 1.75, 2.0.
3-4) Calculate the mean if x and y, and put a big red "#" on this
point of the graph in 3-3). Use
only one statement.
3-5) Draw a vertical blue thick dashed line at mean value of
x.
3-6) Put "mean of x" at the mean value of x, at 5 lines outside the
graph window.