Learn R Programming

yamlet (version 0.6.5)

mimic.default: Try To Look Like Another Equal-length Variable

Description

Tries to mimic another vector or factor. If meaningful and possible, x acquires a guide attribute with labels from corresponding values in y. Any codelist attribute is removed. No guide is created for zero-length x.

Usage

# S3 method for default
mimic(x, y = x, ...)

Arguments

x

vector-like

y

vector-like, same length as x

...

ignored arguments

Value

same class as x

See Also

Other mimic: mimic.classified(), mimic()

Other interface: classified.data.frame(), decorate.character(), decorate.data.frame(), desolve.decorated(), ggplot.decorated(), io_csv.character(), io_csv.data.frame(), io_res.character(), io_table.character(), io_table.data.frame(), io_yamlet.character(), io_yamlet.data.frame(), is_parseable.default(), modify.default(), promote.default(), read_yamlet(), resolve.decorated(), selected.default(), write_yamlet()

Examples

Run this code
# NOT RUN {
example(mimic.classified)

# }

Run the code above in your browser using DataLab