| codes {dembase} | R Documentation |
Extract the codes for one of the classifications used by an object of
class Concordance.
codes(object, classification) ## S4 method for signature 'Concordance' codes(object, classification)
object |
Object of class |
classification |
Name of a classification. |
A character vector.
Names of classifications can be extracted or changed using
classifications.
x <- data.frame(code = 1:3,
descriptor = c("North Island", "South Island",
"Stewart Island"))
x <- Concordance(x)
x
codes(x, classification = "code")
codes(x, classification = "descriptor")
x <- data.frame(sex1 = c("girl", "boy", "woman", "man"),
sex2 = c("female", "male"))
x <- Concordance(x)
x
codes(x, classification = "sex1")
codes(x, classification = "sex2")