2024-04-01
Questions
Objectives
ggplot2 plots work best with data in the ‘long’ format
To build a ggplot, we will use the following basic template that can be used for different types of plots:
\[ Plot = Data + Aesthetics + Geom \]
Example 1 Based catch landing datset you have been exploring load the dataset and calculate the median total catch by country and epoch.
Solution. Your calculation will use the catch
variable and median
function to calculate the median.
Example 2 Based catch landing datset you have been exploring load the dataset and calculate the median total catch by country and epoch.
Solution. Your calculation will use the catch
variable and median
function to calculate the median.
term | df | sumsq | meansq | statistic | p.value |
---|---|---|---|---|---|
loc | 2 | 32,171.73 | 16,085.8674 | 83.38093 | 0.0000000000000000000001073077 |
Residuals | 109 | 21,028.31 | 192.9202 |