Skip to contents

sframe_validation is the diagnostic object returned by validate_sframe() and sframe_validate_model(). It records whether the object passed, every problem found, and every check that ran, including the checks that found nothing.

Value

print() returns x invisibly. format() returns a single character string. summary() returns the check table as a data frame. as.data.frame() returns one row per problem.

Details

Use sframe_is_valid() for the pass or fail flag, sframe_problems() for the messages, as.data.frame() for a problem-per-row table, summary() for the full check roster, and as_sframe() to recover the validated instrument.

Examples

cs    <- sframe_choice_set("ag5", 1:5,
           c("Strongly disagree", "Disagree", "Neutral",
             "Agree", "Strongly agree"))
item  <- sframe_item("sat_1", "The service met my expectations.",
                 type = "likert", choice_set = "ag5", scale_id = "sat")
scale <- sframe_scale("sat", "Satisfaction", items = "sat_1")
instr <- sframe_instrument("Demo Survey", components = list(cs, item, scale))

v <- validate_sframe(instr, strict = FALSE)
v
sframe_is_valid(v)
sframe_problems(v)
as.data.frame(v)
summary(v)