prepare_soap: Prepare soap for dsm modelling

View source: R/prepare_soap.R

prepare_soapR Documentation

Prepare soap for dsm modelling

Description

Create necessary output for dsm modelling using soap smoother.

Usage

prepare_soap(
  data,
  contour = NULL,
  polygon_pred = NULL,
  ratio_simplify = 1e-04,
  N = 23
)

Arguments

data

data.frame containing at least 3 columns. Among those columns it must have longitude and latitude.

contour

Land contour of the study area where the soap will be implemented (optionnal). Must be a Spatial or sf object containing polygons defining land contour (default is NULL).

polygon_pred

Polygon defining the area where the soap will be implemented. Either a Spatial or sf object containing polygon.

ratio_simplify

Correspond to the 'keep' argument of ms_simplify (default 1e-4).

N

Number of knots per row and column (default 23).

Value

  1. sf_cropped_NEA : data.frame (given if polygon_pred is NULL).

  2. bnd : list of list delimiting soap area. Compatible with gam.

  3. knots : data.frame containing longitude and latitude of konts.

  4. df_cropped_data : data.frame corresponding to data without the points outside of bnd.

  5. gg_cropped_data : gg object that synthetised information on the soap process which has been made.

  6. sf_ocean : sf object containging the contour of the study area where knots are placed.

References

This function uses autocruncher, a function created by Simon Wood and improved by David L. Miller (https://github.com/dill/soap_checker/blob/master/autocrunch.R).


MathieuGenu/geffaeR documentation built on March 23, 2022, 7:50 p.m.