Description Usage Arguments Details Value Examples
Translate between classifications, based on a concordance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | translate(object, concordance, to = NULL, ...)
## S4 method for signature 'ANY,ManyToOne,missing'
translate(object, concordance)
## S4 method for signature 'ANY,ManyToOne,ANY'
translate(object, concordance, to)
## S4 method for signature 'ANY,OneToOne,ANY'
translate(object, concordance, to = NULL)
## S4 method for signature 'ANY,OneToOne,'NULL''
translate(object, concordance, to = NULL)
## S4 method for signature 'ANY,OneToOne,missing'
translate(object, concordance)
## S4 method for signature 'ANY,data.frame,ANY'
translate(object, concordance, to = NULL, ...)
## S4 method for signature 'ANY,matrix,ANY'
translate(object, concordance, to = NULL, ...)
|
object |
A character vector. |
concordance |
An object of class |
to |
Name of classification within |
... |
Not currently used. |
If concordance
is ManyToOne
, then
object
must be the 'many' part, and argument to
is not
required. If concordance
is OneToOne
, and
to
is not supplied, translate
guess, based on the values
in object
.
A character vector, the same length as object
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | conc <- data.frame(code = 1:3,
descriptor = c("North Island", "South Island",
"Stewart Island"))
conc <- Concordance(conc)
conc
translate(c("1", "3", "1", "2"),
concordance = conc)
translate(c("Stewart Island", "North Island"),
concordance = conc)
codes(conc, classification = "code")
codes(conc, classification = "descriptor")
conc <- data.frame(sex1 = c("girl", "boy", "woman", "man"),
sex2 = c("female", "male"))
conc <- Concordance(conc)
conc
translate(c("man", "girl"), concordance = conc)
## Not run:
translate(c("female", "male"), concordance = conc)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.