codelist_keywords: Extract keywords from clinical code lists

Description Usage Arguments Details Value Examples

Description

This function takes a dataframe of clinical codes and gives a vector of keywords, sorted by frequency

Usage

1
2
codelist_keywords(codelist, keyword_column = "description",
  extra_stopwords = NULL)

Arguments

codelist

a dataframe of clinical codes, such as downloaded using the get_ClinicalCodes function

keyword_column

The column of the dataframe to extract keywords from

extra_stopwords

an optional character vector of further stopwords to remove

Details

All terms are converted to lower case. Common stopwords, whitespace and punctuation are removed Optional extra_stopwords vector

Value

character vector of keywords, sorted by frequency in the list

Examples

1
2
3
4
5
6
7
## Not run: 
# Get codelist from url:
angina_codes <- get_ClinicalCodes(
url = "https://clinicalcodes.rss.mhs.man.ac.uk/medcodes/article/6/codelist/angina/download/")
codelist_keywords(angina_codes, extra_stopwords = c("good", "poor", "[x]"))

## End(Not run)

rClinicalCodes documentation built on May 2, 2019, 11:21 a.m.