rhrMapFields: Map information to columns

Description Usage Arguments Details Value

View source: R/rhrMapFields.R

Description

Convenience function to prepare data for further analysis.

Usage

1
2
3
rhrMapFields(dat, fields = list(lon = NA, lat = NA, id = NA, date = NA, time =
  NA), projString = NULL, projStringOut = NULL, dateFormat = "ymd",
  timeFormat = "hms", defaultId = "Animal_1")

Arguments

dat

A data.frame or SptialPointsDataFrame.

fields

A list with named elements for lon, lat and id. Optionally also for date and time.

projString

A object of class CRS.

projStringOut

A object of class CRS, to which the data is transformed to.

dateFormat

A character indicating date format, see details.

timeFormat

A character indicating time format, see details.

defaultId

A character indicating default ID in case id is missing from fields.

Details

For date and time the lubridate conventions are used. E.g. day-month-year is abbreviated as dmy.

Value

A list of class RhrMappedData. The list contains the following elements: dat (SpatialPointsDataFrame, with the data), hasTS (logical scalar indicating if there is a timestamp) and a list that gives information about the number of missing and duplicated points.


jmsigner/rhr documentation built on June 26, 2020, 8:59 a.m.