visualize.classcodes {coder}R Documentation

Visualize classification scheme in web browser

Description

Groups from a classcodes object are visualized by their regular expressions in the default web browser. The visualization does not give any details on group names, conditions or weights but might be useful both for understanding of a classification scheme in use, and during the creation and debugging of such.

Usage

## S3 method for class 'classcodes'
visualize(x, group = NULL, show = TRUE, ...)

Arguments

x

classcodes object or name of such object included in the package (see all_classcodes()).

group

names (as character vector) of groups to visualize (subset of rownames(x)). (All groups if NULL.)

show

should a visualization be shown in the default web browser. Set to FALSE to just retrieve a URL for later use.

...

Arguments passed on to set_classcodes

regex

name of column with regular expressions to use for classification. NULL (default) uses attr(obj, "regexpr")[1].

Value

URL to website with visualization (invisible)

See Also

Other classcodes: all_classcodes(), as.data.frame.classified(), classcodes, codebook(), print.classcodes(), print.classified(), set_classcodes(), summary.classcodes()

Examples


# The default behavior is to open a visualization in the default web browser
## Not run: 

 # How is depression classified according to Elixhauser?
 visualize("elixhauser", "depression")

 # Compare the two diabetes groups according to Charlson
 visualize("charlson",
   c("diabetes without complication", "diabetes complication"))

 # Is this different from the "Royal College of Surgeons classification?
 # Yes, there is only one group for diabetes
 visualize("charlson",
   c("diabetes without complication", "diabetes complication"),
   regex = "rcs"
 )

 # Show all groups from Charlson
 visualize("charlson")

 # It is also possible to visualize an arbitrary regular expression
 # from a character string
 visualize("I2([12]|52)")

## End(Not run)

 # The URL is always returned (invisable) but the visual display can
 # also be omitted
url <- visualize("hip_ae", show = FALSE)
url

[Package coder version 0.13.10 Index]