Description Usage Arguments Details Value Note Author(s) References See Also Examples
A spec is a keyed data.frame giving an abstract specification of
a data table. It has columns column, label, type, guide, required,
and derivation. These are descriptive or prescriptive for the specified table.
The character method for as.spec expects a scalar file name.
as.vector returns the documented column names. read.spec
and write.spec use unquoted, tab-delimited cells, with '', ‘.’, and
‘NA’ representing missing values (na strings). The summary method
does not worry about sort order. Generally one should not sort a spec,
since record order is informative.
1 2 3 4 5 6 7 8 9 10 11 |
x |
object of dispatch |
object |
object of dispatch |
mode |
passed to |
clean |
whether to strip leading and trailing quote characters and spaces |
file |
character |
... |
ignored or passed |
column gives the name and order of columns.
label is a descriptive substitute for column.
type is one of character,numeric, integer, or datetime,
where datetime indicates something in the timepoint class.
guide is interpretive material: typically units for numeric
columns, or encoded levels for factor-like columns. datetime
columns expect a corresponding format string, as for as.mDateTime.
Numeric guides are formally composed of an optional descriptor called guidetext
followed by an optional range specifier in the form [0,30] or (0,30], etc.
required is an enforceable presence specifier, typically 0 or 1. It can be
any R expression that can be coerced to logical and evaluated in the environment
defined by the specified data frame.
derivation is (non-tab) free text intended as a high-level
description of how the column depends on other columns or data sources.
object of class spec keyed data.frame for read.spec and as.spec
Since spec is stored as tab-delimited, it is rarely
necessary to quote the contents of cells (though some external tools
do this anyway). As of 5.56, matched leading/trailing double quotes and spaces
are stripped by default for read.spec (after stripping outer
white space). To clean up the stored file, use clean.spec.
Tim Bergsma
http://metrumrg.googlecode.com
specfile
specification
codes
encode
%matches%
1 | example(`%matches%`)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.