| resolve.factor | R Documentation |
Resolves implicit usage of default key 'guide' to
explicit usage for factor.
Calls explicit_guide
followed by classified.
If option yamlet_with_title is not NULL, and if 'units'
present, label and units will be concatenated by default to create
a title attribute (but this is generally unexpected).
## S3 method for class 'factor'
resolve(x, ...)
x |
factor |
... |
passed to |
If decorating a factor with a guide, it is recommended to supply one that resolves to a codelist. An even safer practice is to convert the factor first to character, so that there are no factor levels to disagree with the (somewhat equivalent) codelist.
classified
Other resolve:
desolve(),
desolve.classified(),
desolve.data.frame(),
desolve.decorated(),
desolve.default(),
desolve.dvec(),
resolve(),
resolve.classified(),
resolve.data.frame(),
resolve.decorated(),
resolve.default(),
resolve.dvec()
Other dvec:
[.dvec(),
[<-.dvec(),
[[.dvec(),
[[<-.dvec(),
as.data.frame.dvec(),
as_dvec(),
as_dvec.character(),
as_dvec.complex(),
as_dvec.dvec(),
as_dvec.integer(),
as_dvec.logical(),
as_dvec.numeric(),
c.dvec(),
classified.dvec(),
desolve.dvec(),
explicit_guide.data.frame(),
format.dvec(),
implicit_guide.dvec(),
implicit_guide.factor(),
length.dvec(),
print.dvec(),
resolve.classified(),
resolve.dvec(),
unclassified.dvec()
library(magrittr)
x <- factor(1:3)
attr(x, 'guide') <- list(a = 1, b = 2, c = 3)
x
resolve(x)
x <- data.frame(bar = x)
x
resolve(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.