F.length.frequency | R Documentation |
Plot frequency distribution of fork lengths over life stages or by life stage
F.length.frequency( site, taxon, run, min.date, max.date, output.file, by.lifestage )
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 |
run |
The run code. This is an integer value that corresponds to
a run listed in table
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 |
max.date |
The end date for data to include. Same format as
|
output.file |
The name of the file prefix under which output is to be saved. Set to NA to plot to the Plot window. |
by.lifestage |
When set to |
Either a single histogram, if variable by.lifestage
is set to
FALSE
. Otherwise, a histogram for each individual life stage present
within the data.
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.
Trent McDonald and Jason Mitchell
F.get.indiv.fish.data
## Not run: # ---- Obtain graphical histograms for the American. site <- 57000 taxon <- 161980 run <- 3 min.date <- "2014-01-01" max.date <- "2014-06-06" output.file <- "American" by.lifestage <- TRUE F.length.frequency(site,taxon,run,min.date,max.date,output.file,by.lifestage) # 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/length.frequency_ST004X_2022-03-21_14-33-45") F.length.frequency(site,taxon,run,min.date,max.date,output.file,FALSE) output.file <- paste0(output.file, "_lstage") F.length.frequency(site,taxon,run,min.date,max.date,output.file,TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.