q_bts_sizecomp | R Documentation |
currently only available for goa and ai total size comps
q_bts_sizecomp(year, species, area, db, print_sql = FALSE, save = TRUE)
year |
max year to retrieve data from |
species |
5 digit afsc species code(s) e.g., 79210 or c(79210, 90210) |
area |
options are 'ai' or 'goa' - can only call a single area |
db |
the database to query (afsc) |
print_sql |
outputs the sql query instead of calling the data (default: false) |
save |
save the file in designated folder, if FALSE outputs to global environment |
saves bts sizecomp data as data/raw/area_bts_sizecomp_data.csv or outputs to the global environment, also saves a copy of the SQL code used for the query and stores it in the data/sql folder.
## Not run:
db <- afscdata::connect("afsc")
q_bts_sizecomp(year=2022, species=21921, area = "goa", db = db)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.