Researchers for the North Temperate Lakes Long-Term Ecological Research program have collected fish from a number of lakes in Wisconsin since 1981. The total lengths and weights of Yellow Perch (Perca flavescens) captured from Trout Lake from 1981-2006 are recorded in YPerchTL.1 Use these data to answer the following questions.
1 See “CSV file” link in “Source” section of linked page.
- Remove the
lakeid
andspname
variables from the data frame as these variables are constant for all records. - Remove all records for which the
gearid
is “CRAYTR”, “FYKNED”, “FYKNEL”, “MINNOW”, “TRAMML”, or any of “VGN0XX”, as very few Yellow Perch were captured in these gears.2 [Use this data frame for the remaining questions.] - Create a new data frame of Yellow Perch captured in just fyke nets.
- Create a new data frame of Yellow Perch captured in fyke nets and beach seines.
- Create a new data frame of Yellow Perch captured in 1998.
- Create a new data frame of Yellow Perch captured after 1999.
- Create a new data frame of Yellow Perch captured in the 1990s.
- Create a new data frame of Yellow Perch captured with only fyke nets in 2005.
- Create a new data frame of Yellow Perch captured with only beach seines and fyke nets in 2000.
- Make the following changes to the data frame of Yellow Perch captured in fyke nets and beach seines in 2000.
- Change the name of the
length
andweight
variables totl
andwt
, respectively. - Create a new variable that is the total length in inches.
- Create two new variables that are the common logarithms of the lengths (in mm) and weights.
- Add a variable that contains 10 mm wide length categories.
- Add a variable that contains the appropriate five-cell Gabelhouse length categories.
- Sort the data by total length within capture year.
- Change the name of the
2 It may be eaiser to look at the list of gearid
values and keep the ones that are not listed here.
Save Your Script
Some of these data frames will be used in this graphing, this size structure, and this weight-length relationhip exercises.
Solution Code:
Available upon request to students not in a class. Contact fishR maintainers.