check_document_covariate_table: Check that the document covariate table is proper

Description Usage Arguments Value Examples

View source: R/TS_on_LDA.R

Description

Check that the table of document-level covariates is conformable to a data frame and of the right size (correct number of documents) for the document-topic output from the LDA models.

Usage

1
2
check_document_covariate_table(document_covariate_table,
  LDA_models = NULL, document_term_table = NULL)

Arguments

document_covariate_table

Document covariate table to evaluate.

LDA_models

Reference LDA model list (class LDA_set) that includes as its first element a properly fitted LDA model with a gamma slot with the document-topic distribution.

document_term_table

Optional input for checking when LDA_models is NULL

Value

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

Examples

1
2
  data(rodents)
  check_document_covariate_table(rodents$document_covariate_table)

weecology/LDATS documentation built on March 28, 2020, 11:20 a.m.