problem_message: Create a message from a problem object

View source: R/problem_message.R

problem_messageR Documentation

Create a message from a problem object

Description

problem_message() is an S3 generic that powers the conversion of problems detected by tbl_check(), vec_check(), and their related helper functions into a human-readable message.

Usage

problem_message(problem, ...)

Arguments

problem

An object with base class gradethis_problem. Problems identified by tblcheck also include tblcheck_problem, plus additional classes that more specifically identify the problem type.

...

Additional arguments passed to the underlying methods.

Value

A length-1 character string with a message describing the problem.

See Also

Other Problem functions: problem_grade(), problem_type(), problem()

Examples

problem <- problem(
	type = "class",
	expected = "character",
	actual = "numeric",
	expected_length = 1,
	actual_length = 2
)

problem_message(problem)


rstudio/tblcheck documentation built on March 11, 2023, 5:42 p.m.