View source: R/assignment_column.r
assignment_column | R Documentation |
Assign observations to zone or area person("Melanie", "Harsch", role = c("aut"))
assignment_column(
dat,
gridfile,
hull.polygon,
lon.dat,
lat.dat,
categ,
closest.pt,
lon.grid,
lat.grid
)
dat |
Main data frame containing data on hauls or trips. Table in fishset_db database should contain the string 'MainDataTable'. |
gridfile |
Spatial data. Shape, json, and csv formats are supported. |
hull.polygon |
T/F If TRUE, creates convex hull polygon. Use if spatial data creating polygon are sparse or irregular. |
lon.dat |
Column containing longitude data in main data frame. |
lat.dat |
Column containing latitude data in main data frame. |
categ |
Column in gridfile that identifies the individual areas or zones. If gridfile is class sf, 'categ' should be name of list containing information on zones. |
closest.pt |
TRUE/FALSE If true, zone ID identified as the closest polygon to the point. |
lon.grid |
If gridfile is not shape or json file, specify column containing longitude data in gridfile. |
lat.grid |
If gridfile is not shape or json file, specify column containing latitude data in gridfile. |
Assign each observation to zones defined by a spatial data set. Converts point data from gridfile into polygons and then finds which polygon each observation in the main data frame is within. Use hull.polygon=T if data is sparse or irregular.
Main data frame with new assignment column labeled zoneID.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.