prepare_data_obs: Preparation of observation data.

View source: R/data_prep_obs.R

prepare_data_obsR Documentation

Preparation of observation data.

Description

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

Usage

prepare_data_obs(
  sp,
  obs_base,
  legdata,
  segdata,
  shape,
  shape_layer,
  projection,
  truncation = NULL,
  remove_sp = NULL,
  unit_km = FALSE
)

Arguments

sp

Name of taxon, group, family or species.

obs_base

Observation database.

legdata

"Legdata" data.frame, built with prepare_data_effort.

segdata

"Segdata" data.frame, built with prepare_data_effort.

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.

projection

Projection of shape object.

truncation

Default = NULL. disstance of truncation of the sampling (in km)

remove_sp

Species to remove of the data set.

unit_km

Default = FALSE. Is the unit of distance in the data set is in km ?

Value

This function return a list containing :

  1. distdata : Data.frame with distance information, which aim to be an input for ds.

  2. obsdata : Data.frame containing information at observation scale.

  3. countdata_leg : A data.frame that merge leg scale effort informations with number of sightings and number of individuals (N and Y).

  4. countdata_seg : A data.frame that merge segment scale effort informations with number of sightings and number of individuals (N and Y).


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