Using the MyOpenMath generated data, replicate the work done in my examples.A3 Q1 in MyOpenMath will generate two new data sets for you. Attach the first one (exams four and five) to the one you used in Assignment 2. Then append the second data set of new students (who have an exam score for all five exams). Sort the data set in alphabetical order and output only the first five rows of the data. (You should use a function within proc print in SAS and a similar feature in R such that the entire data set does not display.)A3 Q2 in MyOpenMath will generate two new data sets for you. Attach the first one (sale price) to the one you used in Assignment 2. Then append the second data set of new homes. Sort the data set by largest sale price and output only the first five rows of the data. (You should use a function within proc print in SAS and a similar feature in R such that the entire data set does not display.)Do not manipulate your data in Excel or any other program.Note that there is nothing to submit in MyOpenMath for this assignment. The two data set has been provided below in the screenshot and also the example for the assignment.3
Combining and Sorting Data Sets
• Make sure your data attaches and appends correctly. One of the biggest obstacles in programming isn’t
“getting the code to run without error”; rather, it’s getting the code to do exactly what you want (and
realizing when it isn’t).
• As we move forward in this course, pay close attention to what I’m asking you to do. It won’t always be
an exact replica, so explore what I’ve done, why I’ve done it, and how you have to tweak it to get things
how you need them. This exploration is really valuable and the best way I can help you learn this stuff!
• Example 1
– The following data set shows only the first five rows, sorted by name in alphabetical order.
– Per the comment above – the first four sets of this code are simply to break apart what started as one
data set. In the future though I won’t spell out the exact differences, as I expect you to get into the
code and play around with it yourself.
– R: I learned a new trick since making the screenshot below. We haven’t messed with rownames() or
colnames() (though the latter can be really helpful) so here’s a good chance for you to have this in
your R bank. row.names(Data)
Purchase answer to see full