make_grid: Create a grid based on fishing event data.

Description Usage Arguments Value

View source: R/utils.R

Description

Creates a grid of cells for which fishing event data exist. The cells with zero fishing events and cells which have less than min_num_fids will be removed.

Usage

1
2
3
4
5
6
7
make_grid(
  d,
  cell_size = 10000,
  min_num_fids = 3,
  data_col = NA,
  data_fncs = NA
)

Arguments

d

An sf POINT object

cell_size

Cell side length in meters

min_num_fids

Minimum number of FIDs in a cell. If less than this, they will be set to zero

data_col

A vector of column names found in d to be summed and appended to the return data frame

data_fncs

A vector of functions to use for summarization of the data_col columns. Must be the same length as the data_col vector

Value

A list of length 2 with the first element being an sf MULTIPOLYGON object with columns added: cell and num_fids, and the second element being the number of cells removed due to the filtering of data to accomodate the rule of min_num_fids


pbs-assess/hakedata documentation built on Jan. 16, 2021, 9:15 p.m.