Description Usage Arguments Details Value Author(s) Examples
To calculate the relation between two codings, given the coding indexes.
1 | relation(index1, index2)
|
index1 |
The first coding index, it is length-2 integer vector with the first element (index1[1]) less than the second element (index1[2]). |
index2 |
The second coding index, it is length-2 integer vector with the first element (index2[1]) less than the second element (index2[2]). |
The relation between two codings can be any one of inclusion, overlap, exact (special case of inclusion and overlap) and proximity (Neither overlap nor inclusion). It should be noted that two adjacent codings are regarded as proximity with distance of 0.
A 6-element list:
Relation |
Length-1 character, standing for the type of relation. It may be one of inclusion, overlap, exact or proximity. |
OverlapIndex |
Length-2 vector, the index of overlapping between two coding indexes. It is c(NA,NA) when relation is proximity. |
UnionIndex |
Length-2 vector, the index of union of the two coding indexes. It is c(NA,NA) when relation is proximity. |
Distance |
Distance of two coding indexes. It is NA when relation is not proximity. |
WhichMin |
Which argument (index1 or index2) has the minimum value. If both have the same minmum value, return NA. |
WhichMax |
Which argument (index1 or index2) has the maximum value. If both have the same maxmum value, return NA. |
HUANG Ronggui
1 2 3 4 5 6 7 8 9 | ## Not run:
relation(c(20,30),c(22,28)) # inclusion
relation(c(10,40),c(20,80)) # overlap
relation(c(10,20),c(30,50)) # proximity with distance of 10
relation(c(10,20),c(20,50)) # proximity with distance of 0
relation(c(10,20),c(10,20)) # exact
relation(c(10,20),c(10,30)) # WhichMin is c(1,2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.