prepare_data_effort: Preparation of effort data.

View source: R/data_prep_effort.R

prepare_data_effortR Documentation

Preparation of effort data.

Description

Transform raw effort data into multiple sub data.frame for next analysis of other functions of the package.

Usage

prepare_data_effort(
  effort_base,
  covariable = NULL,
  block_area,
  shape,
  shape_layer,
  New_projection,
  optimal = FALSE,
  col2keep = NULL
)

Arguments

effort_base

data.frame with effort data.

covariable

vector of covariable names to keep in output of the function.

block_area

Data.frame with 2 colnames :

  1. Block.

  2. Area.

shape

Shapefile of the study area. It can be either a SpatialPolygonsDataFrame class object, in this case it is not necessary to give shape_layer argument. Or it can be the name of the shape object with its extension ".shp" (ex : "data/studyAreaShapefile.shp").

shape_layer

Layer of the shapefile if shape is a character string.

New_projection

New projection of longitude and latitude of columns (POINT_X et POINT_Y) in Proj4String format, see : CRS for more infos.

optimal

Argument which allows to keep data sampled in optimal conditions. Defaults settings are all data are kept. In case of optimal = T, indexes "c("GG", "GM", "MG", "EG", "GE", "EE", "ME", "EM", "MM")" are kept.

col2keep

Columns to keep from effort_base in output of the function.

Value

This function return a list containing:

  1. legdata : data.frame with infos at leg scale.

  2. segdata : data.frame with infos at segment scale.


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