make_integer_times: Add a time variable with integer values for evenly sampled...

Description Usage Arguments Details Value

View source: R/utils-data-processing.R

Description

Add a time variable with integer values for evenly sampled data

Usage

1
make_integer_times(data, period = NULL, tol = 1e-06)

Arguments

data

dataset to modify

period

period to check the times against (if NULL, first check to see if there is a known period set in the metadata, otherwise assumes 1)

tol

tolerance for the period

Details

First, check if the data are evenly sampled in time. If not, we exit early. Next, if the times are already integer or Date, we don't do anything. If the times are numeric, but roundable to integer, we round. Otherwise, we add a new variable to covariates from 1:n and designate this variable as the timename.

Value

the dataset, with integer times


weecology/MATSS documentation built on May 15, 2020, 7:03 p.m.