Learn R Programming

RQDA (version 0.3-1)

crossCodes: Inter-codes relationship

Description

Return a matrix, give a summary of inter-codes relationship.

Usage

crossCodes(relation=c("overlap","inclusion","exact","proximity"),codeList=NULL,
          data=GetCodingTable(),print=TRUE,...)

crossTwoCodes(cid1,cid2,data,relation=c("overlap","inclusion","exact","proximity"),...)

Arguments

relation

The relation between codes

codeList

A character vector, the codes list on which the inter-code relationship is based

data

Data frame returned by getCodingTable,may be subset of the full coding table

print

When TRUE, print the results automatically

cid1

Length-1 code id. It is numeric.

cid2

Length-1 code id. It is numeric.

is not used yet.

Value

For crossCodes, it is a matrix. The upper matrix contains the number of codings fitting the relation between the respective two codes. the lower matrix is all NA. rownames of the matrix is the name of the codes, and the colnames of the matrix is the corresponding id of codes.

For crossCodes, it is a numeric vector.

Details

The inter-codes relationship calculation is based on the relationship between the associated codings of the codes.

Giving the code name list (a character list), crossCodes returns the inter-relationship of 2 or more than 2 codes. crossCodes make heavy use of for loops, so it may take a while to get the result when the coding table is large.

crossTwoCodes returns the summary of inter-codes relationship of two codes based on the code id (each code id is a length-1 integer vector).

See Also

relation

Examples

Run this code
# NOT RUN {
crossCodes()
# }

Run the code above in your browser using DataLab