☰
Debian Codegraph
@
0.99.31.8.3+dfsg-1
/
/
R
/
wild-codes.R
☽
☼
R/wild-codes.R
code
plain
raw
GPL-2
or GPL-3
2018-2022 Martin Elff (with contributions from Christopher N. Lawrence, Dave Atkins,; Jason W. Morgan, Achim Zeileis, Mael Astruc-Le Souder)
debian/copyright
1
setMethod("wild.codes","item",function(x){
2
vl <- labels(x)
3
vvl <- vl@values
4
use <- !(x %in% vvl)
5
N <- length(x)
6
x <-
[email protected]
[use]
7
8
tab <- Table(x,counts=TRUE,percentage=TRUE)
9
tab[,2] <- 100*tab[,1]/N
10
tab
11
})