View source: R/das_effort_strata.R
das_effort_strata | R Documentation |
Split DAS effort where it intersects with a stratum boundary
das_effort_strata(x, ...)
## S3 method for class 'data.frame'
das_effort_strata(x, ...)
## S3 method for class 'das_df'
das_effort_strata(x, strata.files, ...)
x |
an object of class |
... |
ignored |
strata.files |
list of path(s) of the stratum CSV file(s);
see |
This function should only be called by das_effort
,
i.e. it should not be called by users in their personal scripts.
Practically speaking, this functions splits the effort line wherever it crosses a stratum line.
This point of intersection is interpolated;
specifically, it is determined using st_intersection
.
Thus, any effort will be first split at these effort-stratum boundary intersection points,
and then using the specified method (e.g. condition).
The data frame x, with 1) columns added that
indicate a) if the point was in a particular stratum (see das_intersects_strata
), and
b) the index of the stratum in strata.files
(column name 'stratum'; 0 if the point intersects with no strata), and
2) two rows added for each strata crossing
that occurs between something other than an E and R.
These rows are necessary because of how das_effort
processes effort.
The added rows are the same as the event previous to the strata crossing, except:
They have the event code "strataE" and "strataR", respectively
Their coordinates are the coordinates of the intersection of the effort line and the stratum boundary
Their 'idx_eff' values are plus 0.4 and 0.5, respectively
The second added row has the same stratum info as the point immediately after the stratum boundary crossing
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.