Closed ghost closed 9 years ago
Ok assignment.
For plotting time series data, consider using line plots instead of histograms.
Your approach in question 7 is perhaps not the best way to approach the problem, see my solution for inspiration.
Your regular expressions in question 8 are very inefficient, see my solution instead :)
APPROVED
Question #1 ---------------
read the Data Set
to prepare the Data, need to extract the month from the date
create a new data frame by monthly stock
naming the variables
Question #2 --------
plot the graph
We believe that bar graph will be the most suitable for this data because we are ploting one variable against the frequency
we want the graph to be histogram (explain reson from above) stat="idenity" to let R know that it is a numerical, colour/fill to be RED, then we table the axis and give it a title and theme to be minimal
Question #3 ------------
or
Question #4 -----------
creating a new data frame
naming the variables
Question #5 ----------
Question #6 ------------
Question #7 -------------
Question #8 ---------------
df8$n = nchar(q) - nchar(q2)