check_timename: Check that the time vector is proper

View source: R/TS_on_LDA.R

check_timenameR Documentation

Check that the time vector is proper

Description

Check that the vector of time values is included in the document covariate table and that it is either a integer-conformable or a date. If it is a date, the input is converted to an integer, resulting in the timestep being 1 day, which is often not desired behavior.

Usage

check_timename(document_covariate_table, timename)

Arguments

document_covariate_table

Document covariate table used to query for the time column.

timename

Column name for the time variable to evaluate.

Value

An error message is thrown if timename is not proper, else NULL.

Examples

  data(rodents)
  check_timename(rodents$document_covariate_table, "newmoon")


LDATS documentation built on Sept. 19, 2023, 5:08 p.m.