Usage
## The constructor for objects of class "item"
## more convenient than new("item",...)
## S3 method for class 'numeric':
as.item(x,
labels=NULL, missing.values=NULL,
valid.values=NULL, valid.range=NULL,
value.filter=NULL, measurement=NULL,
annotation=attr(x,"annotation"), ...)
## S3 method for class 'character':
as.item(x,
labels=NULL, missing.values=NULL,
valid.values=NULL, valid.range=NULL,
value.filter=NULL, measurement=NULL,
annotation=attr(x,"annotation"), ...)## S3 method for class 'logical':
as.item(x,\dots)
# x is first coerced to integer,
# arguments in ... are then passed to the "numeric"
# method.
## S3 method for class 'factor':
as.item(x,\dots)
## S3 method for class 'ordered':
as.item(x,\dots)
## S3 method for class 'double.item':
as.item(x,
labels=NULL, missing.values=NULL,
valid.values=NULL, valid.range=NULL,
value.filter=NULL, measurement=NULL,
annotation=attr(x,"annotation"), ...)
## S3 method for class 'integer.item':
as.item(x,
labels=NULL, missing.values=NULL,
valid.values=NULL, valid.range=NULL,
value.filter=NULL, measurement=NULL,
annotation=attr(x,"annotation"), ...)
## S3 method for class 'character.item':
as.item(x,
labels=NULL, missing.values=NULL,
valid.values=NULL, valid.range=NULL,
value.filter=NULL, measurement=NULL,
annotation=attr(x,"annotation"), ...)
Arguments
x
for as.item methods,
any atomic vector; for the as.character, as.factor,
as.integer, as.double, a vector with class "item";
for the unique,
summary
labels
a named vector of the same mode as x.
missing.values
either a vector of the same mode as x,
or a list with components "values",
vector of the same mode as x (which defines individual missing values)
and "range" a matrix with two rows with
t
valid.values
either a vector of the same mode as x,
defining those values of x that are to be considered as valid,
or an object of class "valid.values".
valid.range
either a vector of the same mode as x and length 2,
defining a range of valid values of x,
or an object of class "valid.range".
value.filter
an object of class "value.filter", that is, of
classes "missing.values", "valid.values", or "valid.range".
measurement
level of measurement; one of "nominal", "ordinal", "interval", or "ratio".
annotation
a named character vector,
or an object of class "annotation"
...
further arguments, ignored.