F.size.by.date: F.size.by.date - Plot fork lengths through time.

F.size.by.dateR Documentation

F.size.by.date - Plot fork lengths through time.

Description

Plot fork length (mm) of fish by date of catch for a particular site and year.

Usage

F.size.by.date(site, taxon, run, min.date, max.date, output.file)

Arguments

site

The identification number of the site for which estimates are required.

taxon

The species identifier indicating the type of fish of interest. This is always 161980; i.e., Chinook Salmon.

run

The run code. This is an integer value that corresponds to a run listed in table luRun which is housed inside the Access database. At the time of this writing, the luRun table translated run codes as:

  • 1 = Spring

  • 2 = Summer

  • 3 = Fall

  • 4 = Winter

  • 5 = Late fall

  • 6 = Mixed

Normally, the translation from text (e.g., "fall") to code (e.g., 3) is done by the camp interface.

min.date

The start date for data to include. This is a text string in the format %Y-%m-%d, or YYYY-MM-DD.

max.date

The end date for data to include. Same format as min.date.

output.file

The name of the file prefix under which output is to be saved. Set to NA to plot to the Plot window.

Value

A graphical png entitled via parameter output.file, displaying fork length in millimeters as a function of time. Also, an accompanying csv containing the data used in plotting.

Details

This routine compiles fish from the CAMP Access dBase using function F.get.indiv.fish.data. Fish are included from both "valid" and "invalid" trapping instances where "valid" means includeCatchID = TRUE. Thus, resulting graphs can display both valid and invalid fishing instances if both types of trapping instances took place between min.date and max.date.

Observations in the output graph are jittered slightly when plotted to show the number of measurements on each date.

When no valid catch records are found, a blank png is returned.

Author

Trent McDonald and Jason Mitchell

See Also

F.get.indiv.fish.data

Examples

## Not run: 
# Create a plot of fork length by data for the American.
site <- 57000
taxon <- 161980
run <- 3
min.date <- "2014-01-01"
max.date <- "2014-06-01"
output.file <- "American"

F.size.by.date(site,taxon,run,min.date,max.date,output.file)

# Testing on Trent's local machine
db.file <- file.path("C:/Users/trent/Documents/Projects/1200-RSTPlatform/ThePlatform",
         "CAMP_RST20220103-campR2.0.14/Data/TestingDBs/newStanislausCAMP_20Sept2018/CAMP.mdb")
output.file <- file.path("C:/Users/trent/Documents/Projects/1200-RSTPlatform/ThePlatform",
         "CAMP_RST20220103-campR2.0.14/Outputs/size.by.date_ST004X_2022-03-21_14-33-45")
F.size.by.date(site,taxon,run,min.date,max.date,output.file)


## End(Not run)

tmcd82070/CAMP_RST documentation built on April 6, 2022, 12:07 a.m.