1. [5 marks] Take your version of Assignment #4 – lynxes and hares and modify it so it stores all the variables from a simulation run in a matrix or data frame. At the end of the simulation run, produce a graph showing all the values of the numbers of lynxes, hares, baby lynxes and hares, dead lynxes and hares and eaten hares for each year of the simulation run. Make the graph as handsome as possible. Hand in the graph for the run of 20 years, 30 initial lynxes and 200 initial hares. If you don’t like your version of Assignment #4, you may modify the solutions and hand that in for full marks. If you use your version and if Mitchell told you there are faults, correct the faults before handing this assignment in.
2. [25 marks] Go back to either my solution of Assignment 3 or yours. Basically, you will rewrite a subset of the assignment solution using functions.
a. Write a function MeanMonth() that takes Raw as its input, and computes and returns the means of all the individual months as a vector. You may use mean(x, na.rm=T) here.
b. Write a function MonthlyMeanPlot() that takes the above vector as its input to output a plot of the mean monthly temperatures. The x-axis will consist of the 12 months, labelled either by 1 thru 12 or as character strings if you can figure out how to do this. Hint: you can’t assign a plot() as a variable, but a function will return your plot if the plot code is the last code of the function instructions.
c. Write a function HotMonths() that takes Raw as its input, and computes and returns the total number of months in the data where the mean monthly temperature is greater than or equal to 20 oC and the mean temperature of these hot months. Two values must be returned here, bundled together using whatever data structure you like.
d. Write a function Extend() that takes Raw as its input, and adds a 14th column consisting of the annual January-December average, creating a new data frame called completed. Extend() then returns completed.
e. Write a function AnnualPlot() that takes completed as its input and outputs a plot of the annually averaged temperatures. The x-axis will consist of the years 1877-2017.
f. Hand in all your functions, a run of your code, calling all of your functions, and the two plots. Hints: much of the code in Assignment 3 can be recycled here. You just have to figure out how to write functions and practice passing data among them.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme