Homework Problem Set 1, Due Friday September 4, 2016. ---------------------------------------------------- Homework Problem 1, STAT 705, Fall 2015. Assigned 8/29/2016, Due 9/4/2016 [But since the due-date was ambiguous in the original assignment, homeworks received by 9/7/2016 will also be accepted as on-time.] For each of the following problem parts, your submitted HW solution should contain (a few) R code lines, together with at least one more code line showing IN BRIEF that your code works as desired. LENGTHY OUTPUTS ARE DISCOURAGED -- YOU MAY OF COURSE GENERATE THEM FOR YOUR OWN CHECKING, BUT I AM LOOKING FOR BRIEF WAYS TO VERIFY SOME NON-OBVIOUS ASPECT (your choice) OF THE R OBJECTS YOU GENERATE. (a) Give the R code lines to create a single long integer vector named LongI in your workspace, consisting of: the 4-tuple (3,7,6,9) appearing 25 times followed by the arithmetic progression from 273 down to 0 (inclusive) by 3's, with this whole sequence repeated 10 times alternately in forward and reverse order. Relevant R commands: "rep", "rev" (b) In the vector you generate in (a), give the 777'th and 1000'th elements. (c) Give a table of the frequencies of occurrence of all of the decimal digits 0,...,9 in all components of your vector in (a). HINT: make a long character string out of your concatenated integer vector, and then split it into individual characters and change those back to numbers. Relevant R commands: "table", "paste", "strsplit", "unlist" (d) Create a data-frame "Dfr" consisting of the following 3 columns: column 1, named "TorF": a logical vector of length 120 consisting of TRUE/FALSE values corresponding to the condition sin(3*k^2 - 7) > 0 for k=1,..,120 column 2, named "Sums": a numeric vector giving the partial sums for j=1 up to k of sin(3*j^2 - 7) , as k ranges from 1 to 120 column 3, named "Grades": a character vector containing respectively "A","B","C","D","F" in every position k where the column 2 value falls in the ranges (-1,Inf), (-3,-1], (-5,-3], (-7,-5], (-Inf,-7] PRINT ONLY A FEW LINES OF YOUR DATA-FRAME, and verify that the columns have the desired variable types. Relevant R commands: "cumsum", "class"