as.location_dataframe: Conversion to location_dataframe

View source: R/movement.R

as.location_dataframeR Documentation

Conversion to location_dataframe

Description

Convert objects to location_dataframe objects

Usage

as.location_dataframe(input, ...)

## S3 method for class 'data.frame'
as.location_dataframe(input, ...)

## S3 method for class 'SpatialPolygonsDataFrame'
as.location_dataframe(input,
  populationraster, ...)

Arguments

input

object to convert to a location_dataframe object. Either a data.frame with columns location (character), populations (numeric) and coordinate columns x (numeric) and y (numeric) or a SpatialPolygonsDataFrame object

populationraster

a RasterLayer object with each the value of each cell giving the associated population density.

...

further arguments passed to or from other methods.

Value

A location_dataframe objects which is a data.frame containing location data with columns location (character), population (numeric), x (numeric) and y (numeric).


SEEG-Oxford/movement documentation built on April 17, 2023, 4:17 p.m.