reduceDuplicated: Remove duplicated pollen sites from the same climate grid.

Description Usage Arguments Value Author(s) Examples

Description

This function reduce the pollen sites that fall in the same grid cell of the climate rasters. The result is a new community matrix where the latlong coordinates are shifted to the pixels centers in which there are a pollen site. When there are several pollen sites in the same grid cell their values are averaged.

Usage

1
reduceDuplicated(commM, raster, weighted=FALSE)

Arguments

commM

Matrix object. Community matrix (species by sites) with 4 extra columns: "sites" (for sites names), "Longitude" (for the x coordinates), "Latitude" (for the y coordinates), and "mean.quality" (for quality data).

raster

Raster. This object is used to define the grid cells

weighted

Logical value. This argument indicate whether the average should be weighted by data quality. Default value is FALSE and the mean is unweighted.

Value

This function return a matrix object. This matrix is a community matrix with the same taxa than the input and two extra columns (x and y) for longitude and latitude respectively. The coordinates for each row now correspond to the centroid of the grid cell in which the pollen sites where placed, and the pollen values are the average (weighted or not depending on the user).

Author(s)

Diego Nieto Lugilde

Examples

1
2
3
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

dinilu/paleoCLMs-package documentation built on May 15, 2019, 8:46 a.m.