Learn R Programming

amt (version 0.1.2)

summarize_sampling_rate: Returns a summary of sampling rates

Description

Returns a summary of sampling rates

Usage

summarize_sampling_rate(x, ...)

# S3 method for track_xyt summarize_sampling_rate( x, time_unit = "auto", summarize = TRUE, as_tibble = TRUE, ... )

summarize_sampling_rate_many(x, ...)

# S3 method for track_xyt summarize_sampling_rate_many(x, cols, ...)

Arguments

x

A track_xyt.

...

Further arguments, none implemented.

time_unit

A character. The time unit in which the sampling rate is calculated. Acceptable values are sec, min, hour, day, and auto. If auto (the default) is used, the optimal unit is guessed.

summarize

A logical. If TRUE a summary is returned, otherwise raw sampling intervals are returned.

as_tibble

A logical. Should result be returned as tibble or as table.

cols

[character(>= 1)] Indicating columns to be used as grouping variables.

Value

Depending on summarize and as_tibble, a vector, table or tibble.

Examples

Run this code
# NOT RUN {
data(deer)
amt::summarize_sampling_rate(deer)

data(amt_fisher)
# Add the month
amt_fisher %>% mutate(yday = lubridate::yday(t_)) %>%
summarize_sampling_rate_many(c("id", "yday"))

# }

Run the code above in your browser using DataLab