Learn R Programming

spec (version 0.1.9)

specify.data.frame: Specify Data Frame

Description

Attach specifics to a data.frame as attributes, including label and guide.

Usage

# S3 method for data.frame
specify(x, spec, na.rm = TRUE, empty.rm = TRUE, ...)

Arguments

x

data.frame

spec

a data spec (or corresponding filepath) to use as source of attributes

na.rm

if TRUE, don't assign NA where encountered

empty.rm

if TRUE, don't assign empty string where encountered

...

passed arguments

See Also

Other specify: specify.character(), specify()

Examples

Run this code
data(drug)
spec <- specification(drug,tol = 3)
drug %matches% spec
drug <- specify(drug,spec)
attributes(drug$HEIGHT)

Run the code above in your browser using DataLab