R
Exercise 1
The additional field for the second match score is created by adding score2<- c( , , , , , ), with values of the same length as previous. score2 was also added to the data.frame. Each field is accessed seperately by game_cards$fieldname fieldname:score1/ score2
INSTRUCTOR FEEDBACK: excellent execution Score:1
Ecercise 2
The minimum scores from match 1 and match 2 were 34 and 29 respectively.
The maximum scores from mathc 1 and match 2 were 100 and 85 respectively.
The minimum score from both matches was 29.
The maximum score from both mathes was 100
The minimum score from match 1 was 34, which was scored by Bob. The minimum score from match 2 was 29, which was scored by Marta.
The maximum score from match 1 was 100, which was scored by Mike. The maximum score from match 2 was 85, which was also scored by Mike.
The function order() arranges the sequence of numbers into an ascending order. order(game_cards$score) rearranges the scores of the matches on the game cards into a sequential order. The output is the ordered sequence of numbers.
INSTRUCTOR FEEDBACK: VERY GOOD. Score 1
The command plot() is used for generic X-Y graph plotting of R objects, through the use of command plot(x,y,...). x = the coordinates of points in the plot. y = the y co-ordinates in the plot. ... = arguments to be passed to the methods, such as graphical parameters. "type" = the type of plot that should be drawn, eg. "p" for points, "l" for lines, "b" for both etc. To add an overall title to the plot, add "main", to add a subtitle fot the plot, add "sub", to add a title for the x and y axis, add "xlab" and "ylab" respectively.
Error in barplot(game_cards$match1, names = game_cards$names): object 'game_cards' not found
Traceback:
1. barplot(game_cards$match1, names = game_cards$names)
INSTRUCTOR FEEDBACK: You answered the question and maybe you could have given some more examples. All good but you need to resolve the errors you get in teh code. Maybe you have to reexecute the cell that defined game_cards. Score 0.75
Exercise 4
The par() command is used to set or query graphucal parameters. Parameters can be set by specifying them as arguments to par in tag = value form, or by passing them as a list of tagged values.
INSTRUCTOR FEEDBACK: All good but can be improved with some examples. Score 1
Exercise 5
Scatter plots are used to plot data points on a horizontal and vertical axis to show how much one variable is affected by another. It uses cartesian co-ordinates to display values for typically two variables of a set of data. A scatter plot can be used either when one continuous variable that is under the control of the experimenter and the other depends on it or when both continuous variables are independent. If a parameter exists that is systematically incremented and/or decremented by the other, it is called the control parameter or independent variable and is customarily plotted along the horizontal axis. The measured or dependent variable is customarily plotted along the vertical axis. If no dependent variable exists, either type of variable can be plotted on either axis and a scatter plot will illustrate only the degree of correlation (not causation) between two variables.
By plotting the values of a variable against itself, the resulting scatter plot shows the points falling along a straight line, with the line of best fit travelling directly through all points.
INSTRUCTOR FEEDBACK: very good. Score 1
Exercise 6
Exercise 7
INSTRUCTOR FEEDBACK: Very nice exploration of teh data. Interpretation is missing but good use of graphical parameters. Score 0.75
Exercise 8
Exercise 9
INSTRUCTOR FEEDBACK: Very good data. You could organise the data in a table to make it more readable. See solution for reference Score 1
Ecercise 10
INSTRUCTOR FEEDBACK: Good use of teh graphical parameters. You could have used par(mfrow..) to create subplots.Score 1
Exercise 11
Error in rbinom(morley$Speed): argument "size" is missing, with no default
Traceback:
1. rbinom(morley$Speed)
INSTRUCTOR FEEDBACK: When you want to store the data use assignment to ojects. In this case you used the correct commands but did not complete the exercise. score 0.5
Exercise 12
There is not a significant difference between the results of experiment 1 and 2, as p>0.05.
There is a significance difference between the results of experiment 1 and 4, as p<0.05
There is a significant difference between the results of experiment 1 and 5, as p<0.05.
There is not a significant difference between the results of experiment 2 and 4 because p>0.05.
There is not a significant difference between the results of experiment 2 and 5, as p>0.05.
There is not a significant difference between the results of experiment 4 and 5 because p>0.05.
PEER-MARK = 10.75
Again you've done a very good job and only really dropped marks on clarity, and the fact that you got the title wrong on one of the experiments for historgram graphs on exercise 10, aside from that, good job.
INSTRUCTOR FEEDBACK: Score 10.75