htmlCodelistHierarchy: Export a SNOMEDcodelist hierarchy to HTML

View source: R/htmlCodelistHierarchy.R

htmlCodelistHierarchyR Documentation

Export a SNOMEDcodelist hierarchy to HTML

Description

Exports a codelist with hierarchy as HTML for easy viewing.

Usage

htmlCodelistHierarchy(
  x,
  file = NULL,
  title = NULL,
  description = NULL,
  extracols = NULL,
  SNOMED = getSNOMED(),
  ...
)

Arguments

x

a SNOMEDcodelist, codelistHierarchy (output of showCodelistHierarchy), or an object which can be coerced to a SNOMEDcodelist (such as a SNOMEDconcept vector).

file

filename to export to. If NULL, no file is written

title

title of HTML document

description

paragraph of description text (excluding <p></p> tags)

extracols

character vector of additional columns of codelist_with_hierarchy to include in HTML output

SNOMED

environment containing the SNOMED dictionary to use

...

extra arguments to pass to as.SNOMEDcodelist

Value

a character vector containing HTML output

See Also

showCodelistHierarchy

Examples

SNOMED <- sampleSNOMED()

my_concepts <- SNOMEDconcept('Acute heart failure')
my_codelist <- SNOMEDcodelist(data.frame(conceptId = my_concepts,
  include_desc = TRUE))
htmlCodelistHierarchy(my_codelist, file = paste0(tempdir(),
  'codelist.html'))
# The codelist.html file can now be viewed in a web browser

# Clean up temporary file
file.remove(paste0(tempdir(), 'codelist.html'))

anoopshah/Rdiagnosislist documentation built on April 21, 2023, 11:49 p.m.