marinakochuten / eds221-day9-activities

Materials for EDS 221 Activities - Day 9
0 stars 0 forks source link

Reprex 1 Practice #1

Open kimberleewong opened 2 months ago

kimberleewong commented 2 months ago
mack_creek_lengths <- mack_creek_vertebrates %>% 
  clean_names() %>% 
  select(year:sampledate) %>% 
  filter(section == "CC") %>% 
 mutate(across(where(is.character), tolower)) %>% 
  drop_na(species) %>% 
  group_by(species) %>% 
  summarize(mean_length_cm = mean(length1, na.rm = TRUE),
            sd_length_cm = sd(length1, na.rm = TRUE)) %>% 
  ungroup()
#> Error in mack_creek_vertebrates %>% clean_names() %>% select(year:sampledate) %>% : could not find function "%>%"

Created on 2024-08-22 with reprex v2.1.1

kimberleewong commented 2 months ago
mack_creek_vertebrates %>% 
  clean_names() %>% 
  filter(species == "ONCL") %>% 
  ggplot(aes(x = length1, y = weight)) +
         geom_point(shape = 12, color = "purple") +
         theme_minimal() +
         labs(x = "Cutthroat trout length (cm)",
              y = "Weight (g)")


    #> Error: attempt to use zero-length variable name

<sup>Created on 2024-08-22 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup>