Package: decoder 1.2.3

decoder: Decode Coded Variables to Plain Text and the Other Way Around

Main function "decode" is used to decode coded key values to plain text. Function "code" can be used to code plain text to code if there is a 1:1 relation between the two. The concept relies on 'keyvalue' objects used for translation. There are several 'keyvalue' objects included in the areas of geographical regional codes, administrative health care unit codes, diagnosis codes and more. It is also easy to extend the use by arbitrary code sets.

Authors:Erik Bulow [aut, cre]

decoder_1.2.3.tar.gz
decoder_1.2.3.zip(r-4.7)decoder_1.2.3.zip(r-4.6)decoder_1.2.3.zip(r-4.5)
decoder_1.2.3.tgz(r-4.6-any)decoder_1.2.3.tgz(r-4.5-any)
decoder_1.2.3.tar.gz(r-4.7-any)decoder_1.2.3.tar.gz(r-4.6-any)
decoder_1.2.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
decoder/json (API)

# Install 'decoder' in R:
install.packages('decoder', repos = c('https://eribul.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/eribul/decoder/issues

Pkgdown/docs site:https://eribul.github.io

Datasets:

On CRAN:

Conda:

5.36 score 1 packages 38 scripts 617 downloads 2 mentions 12 exports 0 dependencies

Last updated from:d214b4f465. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK120
source / vignettesOK206
linux-release-x86_64OK118
macos-release-arm64OK122
macos-oldrel-arm64OK209
windows-develOK93
windows-releaseOK80
windows-oldrelOK77
wasm-releaseOK97

Exports:as.keyas.keyvalueas.valuecodedecodeis.keyis.keyvalueis.valuekungalv2Fyrbodalkungalv2Storgoteborgreal_namesshort_region_names

Dependencies:

Alternative hospital names
Bakgrund | sjukhus_inca | sjukhus | sjukhus_par | Samma kod kan ge olika klartext

Last update: 2026-05-15
Started: 2017-02-03

Decode coded variables to plain text (and vice versa)
Main purpose of the package | Example for "decode" | Manually specified decodings | The whole data.frame at once | A note of caution | Several keyvalues for the same code | Exact versus non exact decoding | More than one decoded variable from the same code | Extra functions | Example for "code" (the opposite of decode) | The underlying machinery | Examples how to create keyvalue objects

Last update: 2020-04-22
Started: 2015-04-30

Readme and manuals

Help Manual

Help pageTopics
Coerce to key or value in objects in a key-value pairas.key as.value is.key is.value key_and_value
Coerce a list to keyvalue objectas.keyvalue.list
Anatomical Therapeutic Chemical (ATC) Classification System codesatc
Decode codes to plain text (and vice versa)code decode decode.data.frame decode.default
Swedish district codesdistrikt
Extra functions to apply to decoded variables using decodeextra_functions kungalv2Fyrbodal kungalv2Storgoteborg real_names short_region_names
FIGO-stadiumfigo
Swedish parish codesforsamling
hemort and hemort2 codes (geographical codes)hemort hemort2
HSN code (Hälso- och sjukvårdsnamnd)hsn
ICD-10-CM codeicd10cm
ICD-10-SE codeicd10se
ICD-7icd7
ICD-7 Grovicd7_grov
ICD-9icd9
ICD-9-CM diagnosis and procedure codesicd9cmd icd9cmp
ICD-Oicdo
ICD-O3icdo3
ICD-O3 Grovicdo3_grov
Coerce to a keyvalue objectas.keyvalue as.keyvalue.data.frame as.keyvalue.default is.keyvalue keyvalue
Clinic codesklinik
Swedish municipality codeskommun
Gender code (kon)kon
Klassifikation av vardatgarder (KVA)kva
Swedish county codeslan
M-stadiumm_rtr
N-stadiumn_rtr
PAD (C24) codepad
Pad leading zeros to characterpad0
Pathology department codespatologiavdelning
Swedish health care regional codesregion
Help tables from Rockanavgm ben digr dodca manuell obd rockan status
Sidasida
Hospital codessjukhus
Hospital codes used by INCAsjukhus_inca
Hospital codes used by Socialstyrelsen and the National Patient Registersjukhus_par
Geographical health care areassjukvardsomrade
Snomed codesnomed
Snomed 3snomed3
Object summary for keyvalue objectssummary.keyvalue
T-stadiumt_rtr
Grund till TNM (patologisk/klinisk)tnmgrund