atl_check_data: Check data has required columns.

Description Usage Arguments Value Author(s) Examples

View source: R/fun_check_data.R

Description

An internal function that checks that the data.table has the required columns. Used within most, if not all, other atlastools functions.

Usage

1
atl_check_data(data, names_expected = c("x", "y", "time"))

Arguments

data

The tracking data to check for required columns. Must be in the form of a data.frame or similar, which can be handled by the function colnames.

names_expected

The names expected as a character vector. By default, checks for the column names x, y, time.

Value

None. Breaks if the data does not have required columns.

Author(s)

Pratik R. Gupte

Examples

1
2
3
4
5
6
7
8
# basic (and only) use
## Not run: 
atl_check_data(
  data = data,
  names_expected = c("x", "y", "time")
)

## End(Not run)

pratikunterwegs/atlastools documentation built on Nov. 7, 2021, 7:14 p.m.