recode_ia {VWPre} | R Documentation |
Recode interest area IDs and/or interest area labels
Description
recode_ia
replaces existing interest area IDs and/or labels for both
eyes. For subsequent data processing, it is important that the ID values range
between 0 and 8 (with 0 representing Outside all predefined interest areas).
Usage
recode_ia(data, IDs = NULL, Labels = NULL)
Arguments
data |
A data table object output by |
IDs |
A named character vector specifying the desired interest area IDs and the corresponding existing IDs where the first element is the old value and the second element is the new value. |
Labels |
A named character vector specifying the desired interest area labels and the corresponding existing labels where the first element is the old value and the second element is the new value. |
Value
A data table with the same dimensions as data
.
Examples
## Not run:
library(VWPre)
# To recode both IDs and Labels...
df <- recode_ia(data=dat, IDs=c("234"="2", "0"="0", "35"="3", "11"="1",
"4"="6666"), Labels=c(Outside="Outside", Target="NewTargName",
Dist2="NewDist2Name", Comp="NewCompName", Dist1="NewDist1Name"))
# For a more complete tutorial on VWPre plotting functions:
vignette("SR_Interest_Areas", package="VWPre")
## End(Not run)
[Package VWPre version 1.2.4 Index]