View source: R/make_length_classess.R
make_length_classess | R Documentation |
Define length classes for predator and preys.
make_length_classess(
inp_dir = ".",
inp_file = "length_classes_config.csv",
max_l = 9999,
write_output = TRUE,
out_file = "length_classes.csv",
minus_one = -1,
same_no_all_data = FALSE
)
inp_dir |
Input directory for |
inp_file |
File name with the configuration of length classes with the format as outlined above. The file must be a CSV file |
max_l |
Upper length in the last "largest" length class. |
write_output |
Flag for saving the length classes defined on |
out_file |
Output file with defined length classes. |
minus_one |
Value to define upper length in length class, e.g. |
same_no_all_data |
Logical, should all size classes have the same numbering irrespective of year and quarter? |
This function makes length classes defined from a lower and an upper value of length (or any other size measurement)
The definition of length classes is given in an input file inp_file
,
see this table
l | Species | y1 | y2 | q1 | q2 |
50 | ALL | 1991 | 2013 | 1 | 4 |
60 | ALL | 1991 | 2013 | 1 | 4 |
70 | ALL | 1991 | 2013 | 1 | 4 |
80 | ALL | 1991 | 2013 | 1 | 4 |
where l is the length used to define length classes, e.g. the first two lines will produce the sizes "050-059" and "060-69". Species is the species name for the length classes. If Species=ALL, all the species will get the same lenngth classes y1 and y2 are the year range for which the length classes will be used. q1 and q2 are the year range for which the length classes will be used.
The defined length classes are made for all combinations of Species, y1 to y1, q1 to q2.
defined length classes.
## Not run: ll<-make_length_classess(inp_dir=system.file('extdata', package = 'FishStomachs'),inp_file='length_classes_config.csv')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.