proxy.factor {yamlet} | R Documentation |
Calculate Substitute Values for Factor Levels
Description
Calculates substitute values for factor levels. If x and y have same length and there is a one-to-one correspondence of their elements, then unique elements of y are returned in an order corresponding to levels(x).
Usage
## S3 method for class 'factor'
proxy(x, y = as.numeric(x), ...)
Arguments
x |
factor |
y |
factor or vector |
... |
ignored |
Value
same class as y
See Also
Other proxy:
proxy()
Examples
proxy(factor(1:3), letters[1:3])
proxy(factor(1:3), factor(letters[1:3]))
proxy(factor(letters[4:6]))
foo <- classified(letters[1:5])
as_yamlet(attributes(foo))
foo <- classified(foo, labels = proxy(foo))
as_yamlet(attributes(foo))
[Package yamlet version 1.2.5 Index]