module06

squid = read.csv("./squid.csv", stringsAsFactors = TRUE) ##reading csv containing squid data
hist(squid$GSI, main = "Histogram of GSI Values", xlab = "GSI") ##creating a histogram for all GSI values

squid$Sex <- factor(squid$Sex, labels = c("Male", "Female")) ##converting sex into a factor
hist(subset(squid, Sex == "Male")$GSI,   main = "GSI Histogram - Male",   xlab = "GSI") ##making a GSI histogram just for males

hist(subset(squid, Sex == "Female")$GSI,   main = "GSI Histogram - Female",   xlab = "GSI") ##making a GSI histogram just for females

squid$logGSI <- log(squid$GSI) ##creating the variable logGSI from the dataset
boxplot(logGSI ~ Sex, data = squid, main = "(GSI) by Sex", ylab = "log(GSI)") ##creating a boxplot of GSI by sex

squid$Location <- factor(squid$Location) ##converting location into a factor
boxplot(logGSI ~ Location, data = squid, main= "GSI by Location", ylab="Location") ##creating a boxplot of GSI by location

---

## Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.

## Running Code

When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:

::: {.cell}

```{.r .cell-code}
1 + 1
[1] 2

:::

You can add options to executable code like this

[1] 4

The echo: false option disables the printing of code (only output is displayed).