Data Wrangling

Inch Lake

Practice data wrangling skills for the Inch Lake data set.
Data Wrangling

Derek H. Ogle


Mar 8, 2019


Dec 27, 2022

Inch Lake is a 12.5 ha inland lake in northern Wisconsin that has been managed as catch-and-release for all species since 2006. Researchers at Northland College have monitored fish populations in Inch Lake since 2007. The total lengths (inches) and weights (g) for subsamples of several species of fish collected from Inch Lake in May of 2007 and 2008 are recorded in InchLake2.1 Use these data to answer the following questions.

1 See “CSV file” link in “Source” section of linked page.

  1. Create a new variable that contains lengths in millimeters.
  2. Remove the netID and fishID variables.
  3. Create a new data frame of just Bluegill.
  4. Create a new data frame of just Largemouth Bass.
  5. Create a new data frame of non-game species (Bluntnose Minnow, Fathead Minnow, Iowa Darter, and Tadpole Madtom).
  6. For the non-game species data frame …
    1. Sort by species.
    2. Sort by length within species within year.
  7. For both the Bluegill and Largemouth Bass only data frames …
    1. Change the names of the weight variable to wt and the length in millimeters variable to tl (if you did not call it that above).
    2. Create two new variables that are the common logarithms of the lengths (in mm) and weights.
    3. Add appropriate five-cell Gabelhouse length categories.
Save Your Script

The data frames created here will be used in this graphing, this weight-length relationhip, and this condition exercises.


Solution Code:

Available upon request to students not in a class. Contact fishR maintainers.