Skip to contents

Guard form of is_spatial(), for functions that reach coordinates by iterating variables_where. Aborts naming the offending columns, so the error points at the metadata mismatch rather than surfacing later and further away.

Usage

ensure_is_spatial(data)

Arguments

data

An aniframe object.

Value

The input data, invisibly.

Examples

af <- aniframe(time = 1:5, x = 1:5, y = 1:5)
ensure_is_spatial(af)