[24 marks)
The next page shows a calendar for year 2022, which has been created and
downloaded from the following website:
https://www.timeanddate.com/
Copyright By PowCoder代写 加微信 powcoder
This question asks you to write some R code to reproduce it (as a graph). The task can
be accomplished by breaking it down into the following steps.
(a) Write a function which, given the name of a month (e.g.,
“April”) or its number
(e.g., 4), creates a graph for the month (only), in the same format as shown in the
calendar. It might be helpful to first focus on a particular month and then extend
the working code in a general manner to any other month. You might want to
provide some information inside your function that is specific about year 2022, but
it is better to keep a minimal amount of such information as long as it is sufficient
to work out other missing pieces. Demonstrate that your function works well for
a few months.
(b) Write a function that can be used to produce the logo that appears on the top-
right corner of the calendar (including the text timeanddate). The logo may look
small, but you can zoom in to have a better look. For simplicity, you are allowed
to use rectangles with right angles in place of those with rounded ones. Make
sure that the colors you use look similar but are generated from the hcl function.
Demonstrate that your function does the job well.
(c) Use the layout function and possibly other R graphics functionality to reproduce
the calendar.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com