Recovers the sframe instrument from a validation diagnostic. This is the
migration path for code that used the strict = TRUE return of
validate_sframe() as an instrument, which it no longer is.
Usage
as_sframe(x, ...)
# S3 method for class 'sframe'
as_sframe(x, ...)
# S3 method for class 'sframe_validation'
as_sframe(x, ...)Arguments
- x
An sframe_validation object or an
sframe.- ...
Passed to methods.
Examples
item <- sf_item("q1", "How satisfied are you?", type = "text")
instr <- sf_instrument("Demo", components = list(item))
validated <- as_sframe(validate_sframe(instr, strict = TRUE))
isTRUE(sf_meta(validated)$validated)
#> [1] TRUE