jorb1 / eds221-day9-activities

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

practice #1

Open jorb1 opened 3 months ago

jorb1 commented 3 months ago
my_second_data <- data.frame(
  stringsAsFactors = FALSE,
            DBCODE = c("AS006", "AS006", "AS006", "AS006", "AS006"),
            ENTITY = c(1, 1, 1, 1, 1),
              YEAR = c(1987, 1987, 1987, 1987, 1987),
          SITECODE = c("MACKCC-L","MACKCC-L",
                       "MACKCC-L","MACKCC-L","MACKCC-L"),
           SECTION = c("CC", "CC", "CC", "CC", "CC"),
             REACH = c("L", "L", "L", "L", "L"),
              PASS = c(1, 1, 1, 1, 1),
           UNITNUM = c(1, 1, 1, 1, 1),
          UNITTYPE = c("R", "R", "R", "R", "R"),
        VERT_INDEX = c(1, 2, 3, 4, 5),
         PITNUMBER = c(NA, NA, NA, NA, NA),
           SPECIES = c("ONCL", "ONCL", "ONCL", "ONCL", "ONCL"),
           LENGTH1 = c(58, 61, 89, 58, 93),
           LENGTH2 = c(NA, NA, NA, NA, NA),
            WEIGHT = c(1.75, 1.95, 5.6, 2.15, 6.9),
              CLIP = c("NONE", "NONE", "NONE", "NONE", "NONE"),
        SAMPLEDATE = c("10/7/87", "10/7/87", "10/7/87", "10/7/87", "10/7/87"),
             NOTES = c(NA, NA, NA, NA, NA)
)

mack_creek_vertebrates %>% 
  clean_names() %>% 
  filter(species == "ONCL") %>% 
  ggplot(aes(x = length1, y = weight)) +
         geom_point(aes(shape = 12), color = "purple") +
         theme_minimal() +
         labs(x = "Cutthroat trout length (cm)",
              y = "Weight (g)")
#> Error in mack_creek_vertebrates %>% clean_names() %>% filter(species == : could not find function "%>%"

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

jorb1 commented 3 months ago

someone please help! lol