View source: R/byGridCell_GridOps.R
byGridCell_GridOps | R Documentation |
Function to perform a mathematical operation on values by grid cell in one or two dataframes.
byGridCell_GridOps( dfr1, op, dfr2 = NULL, cols = c("unsuccessful_indivs", "successful_indivs", "total_indivs", "unsuccessful_abundance", "successful_abundance", "total_abundance"), gridCellID = "gridCellID" )
dfr1 |
- dataframe with results by grid cell |
op |
- operation by grid cell ("+","-","*","/","sqrt") |
dfr2 |
- dataframe with results by grid cell (ignored if op="sqrt") |
cols |
- dataframe column names to apply operation to |
gridCellID |
- column name (as string) for grid cell IDs (default="gridCellID") |
"Factor" levels (gridCellID, startTime) in dataframes must be aligned,
each must have the same number of rows. Columns in dataframe not specified in
cols
are returned unchanged.
Note that dfr1 and dfr2 could also be tibbles or sf datasets. The returned type will be that
of dfr1
.
dataframe with results of operation in requested columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.