set_select | R Documentation |
This function randomly selects stations within particular strata. A specified
number of stations of 3 different categories can be selected, and the minimum distance required
between the stations can be specified. Additional details about each set can be added (such as
which NAFO zones or marine protected area a set falls in) can be added through provision of sf
files to the parameters addExtData1_sf
and/or addExtData2_sf
. Additionally,
certain areas can be set to exclude stations the inclusion of an additional sf object.
set_select(
stationData = NULL,
stationDataField = NULL,
strata_sf = NULL,
strataField = NULL,
addExtData1_sf = NULL,
addExtDataFields1 = NULL,
addExtData2_sf = NULL,
addExtDataFields2 = NULL,
avoid_sf = NULL,
outName = NULL,
writexls = TRUE,
writegpkg = TRUE,
localCRS = 2961,
minDistNM = 4,
tryXTimes = 100
)
stationData |
default is |
stationDataField |
default is |
strata_sf |
default is |
strataField |
default is |
addExtData1_sf |
default is |
addExtDataFields1 |
default is |
addExtData2_sf |
default is |
addExtDataFields2 |
default is |
avoid_sf |
default is |
outName |
This is the name of the output file excel that will be generated and/or the name of a layer withing a gpkg file. |
writexls |
default is |
writegpkg |
default is |
localCRS |
default is |
minDistNM |
default is |
tryXTimes |
default is |
Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca
## Not run:
Spring_4X_2025 <- set_select(stationData = "c:/2025/Spring_4X_RM.csv",
outName = "Spring_4X_2025",
stationDataField = "STRATUM",
strata_sf = Mar.data::Strata_Mar_sf, strataField = "StrataID",
addExtData1_sf = Mar.data::NAFOSubunits_sf, addExtDataFields1 = "NAFO",
addExtData2_sf = oceans_areas_sf,
addExtDataFields2 = c("NAME_E","ZONE_E"),
avoid_sf = this_avoid_sf)
Georges_5Z_2025 <- set_select(stationData = "c:/2025/Georges_5Z_RM.csv.csv",
outName = "Georges_5Z_2025",
stationDataField = "STRATUM",
strata_sf = Mar.data::Strata_Mar_sf, strataField = "StrataID",
addExtData1_sf = Mar.data::NAFOSubunits_sf, addExtDataFields1 = "NAFO",
addExtData2_sf = oceans_areas_sf,
addExtDataFields2 = c("NAME_E","ZONE_E"),
avoid_sf = this_avoid_sf)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.