#Load Packages and Data
library(readr)
library(ggplot2)
library(dplyr)
Ranas_Tem <- read_delim("C:/Users/diego.lizcano/Documents/GitHub/Bd_N_Santander/data/Ranas_Tem.csv",
";", escape_double = FALSE, locale = locale(decimal_mark = ","))
# View(Ranas_Tem)ggplot(data=Ranas_Tem, aes(x=Tem)) +
geom_histogram(binwidth = 0.5, color = "grey30", fill = "white") +
facet_wrap(~species) ggplot(Ranas_Tem, aes(x = Tem, fill = species)) +
geom_histogram(binwidth = 0.5,
alpha = .5, position = "identity") # Create data frame of means to add mean line to faceted histograms
class_mean <- Ranas_Tem %>%
group_by(species) %>%
summarise(Mean = mean(Tem))
ggplot(Ranas_Tem, aes(x = Tem, fill = species)) +
geom_histogram() +
geom_vline(data = class_mean, aes(xintercept = Mean), linetype = "dashed") +
facet_wrap(~species)