Skip to contents

Creating and converting aniframe objects

Functions that create an aniframe, coerce other objects to aniframe, or provide example data.

as_aniframe()
Convert a data frame to aniframe
aniframe()
aniframe package
example_aniframe()
Create example aniframe data
is_aniframe()
Check if object is an aniframe
ensure_is_aniframe()
Ensure object is an aniframe

Metadata handling

Functions for reading, setting, and retrieving the metadata attached to an aniframe.

get_metadata()
Get metadata
set_metadata()
Set metadata for an aniframe
set_unit_time()
Set the temporal unit of an aniframe object
set_unit_space()
Set the spatial unit of an aniframe object
set_unit_angle()
Set the angular unit of an aniframe object
set_sampling_rate()
Set the sampling rate of an aniframe object
default_metadata()
Default metadata structure

Spatial checks

These functions provide checks for your coordinate system.

is_cartesian()
Test whether a data frame uses a Cartesian coordinate system
is_cartesian_1d()
Test for a 1‑D Cartesian coordinate system
is_cartesian_2d()
Test for a 2‑D Cartesian coordinate system
is_cartesian_3d()
Test for a 3‑D Cartesian coordinate system
is_polar()
Test whether a data frame uses a polar coordinate system
is_cylindrical()
Test whether a data frame uses a cylindrical coordinate system
is_spherical()
Test whether a data frame uses a spherical coordinate system
ensure_is_cartesian()
Internal guard for Cartesian checks
ensure_is_cartesian_1d()
Internal guard for 1‑D Cartesian checks
ensure_is_cartesian_2d()
Internal guard for 2‑D Cartesian checks
ensure_is_cartesian_3d()
Internal guard for 3‑D Cartesian checks
ensure_is_polar()
Internal guard for polar checks
ensure_is_cylindrical()
Internal guard for cylindrical checks
ensure_is_spherical()
Internal guard for spherical checks

Helpers

rad_to_deg()
Convert radians to degrees
deg_to_rad()
Convert degrees to radians
convert_nan_to_na()
Convert NaN to NA in numeric columns

Data manipulation (dplyr‑style verbs)

S3 methods that mirror dplyr verbs for aniframe objects.

arrange(<aniframe>)
Arrange rows of an aniframe
filter(<aniframe>)
Filter rows of an aniframe
group_by(<aniframe>)
Group an aniframe
mutate(<aniframe>)
Mutate columns in an aniframe
relocate(<aniframe>)
Relocate columns in an aniframe
rename(<aniframe>)
Rename columns in an aniframe
select(<aniframe>)
Select columns from an aniframe
slice(<aniframe>)
Slice rows from an aniframe
tbl_sum(<aniframe>)
Custom tibble summary for aniframe
ungroup(<aniframe>)
Ungroup an aniframe

Conversion helpers

Methods that let you treat aniframe objects like regular data frames.

as.data.frame(<aniframe>)
Convert aniframe to regular data frame
`[`(<aniframe>)
Subset aniframe with [
`[[`(<aniframe>)
Extract single column from aniframe with [[
`[[<-`(<aniframe>)
Column assignment for aniframe with [[<-
`[<-`(<aniframe>)
Subset assignment for aniframe with [<-
`$<-`(<aniframe>)
Column assignment for aniframe with $<-
`$`(<aniframe>)
Extract column from aniframe with $
`names<-`(<aniframe>)
Rename columns with names<-