View source: R/explicit_guide_factor.R
| implicit_guide.factor | R Documentation |
Coerces factor guide-like attributes to 'guide'.
The attribute 'guide' generally suggests a guide
to interpretation of a data item, such as units, formats, codelists,
and encodings. The idea here is to replace these with 'guide':
i.e., to undo the effects of explicit_guide.dvec.
If guide attribute is still present, the explicit attribute is removed.
Otherwise the explicit element is renamed.
## S3 method for class 'factor'
implicit_guide(x, ...)
x |
factor |
... |
ignored |
factor
Other explicit_guide:
explicit_guide(),
explicit_guide.data.frame(),
explicit_guide.dvec(),
explicit_guide.factor(),
explicit_guide.yamlet(),
implicit_guide(),
implicit_guide.data.frame(),
implicit_guide.dvec(),
infer_guide()
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(),
length.dvec(),
print.dvec(),
resolve.classified(),
resolve.dvec(),
resolve.factor(),
unclassified.dvec()
library(magrittr)
x <- data.frame(RACE = factor(1))
x %<>% modify(RACE, label = 'race', guide = list(white = 0, black = 1, asian = 2))
x %>% decorations
x %>% explicit_guide %>% decorations
x %>% explicit_guide %>% implicit_guide %>% decorations
x %>% explicit_guide(simplify = FALSE) %>% decorations
x %>% explicit_guide(simplify = FALSE) %>% implicit_guide %>% decorations
x %<>% explicit_guide
a <- x$RACE
str(a)
str(a %>% implicit_guide)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.