Learn R Programming

spec (version 0.1.9)

respecify.spec: Respecify Specification

Description

Respecify specification. Updates numeric ranges. Useful if these have changed and spec no longer matches.

Usage

# S3 method for spec
respecify(x, data, file = NULL, ...)

Arguments

x

spec

data

a data.frame or path to csv file

file

where to write the result (default: do not write)

...

passed arguments

See Also

Other respecify: respecify.character(), respecify()

Examples

Run this code
data(drug)
file <- tempfile()
spec <- specification(drug,tol = 3)
write.spec(spec, file = file)
drug %matches% spec
drug %matches% file
max <- max(drug$DV,na.rm=TRUE)
drug$DV[!is.na(drug$DV) & drug$DV == max] <- max + 1
drug %matches% file
respecify(file, drug)
drug %matches% file

Run the code above in your browser using DataLab