respecify.spec: Respecify Specification

View source: R/spec.R

respecify.specR Documentation

Respecify Specification

Description

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

Usage

## S3 method for class '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

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

bergsmat/spec documentation built on Feb. 21, 2024, 1:20 p.m.