icd9toPheWAS | R Documentation |
Given a data.frame
object with a column of ICD9-CM codes, it generates a
new data.frame
object with the ICD9-CM codes transformed into PheWAS codes.
icd9toPheWAS(
data,
icd9ColumnName,
missingValues = "NA",
phecodeDescription = FALSE,
statistics = FALSE,
replaceColumn = TRUE,
verbose = FALSE
)
data |
A |
icd9ColumnName |
The name of the column containing the ICD9-CM. |
missingValues |
The value used to determine missing values in the data.frame. |
phecodeDescription |
By default |
statistics |
By default |
replaceColumn |
By default |
verbose |
By default |
An object of class data.frame
with the ICD9-CM column transform into
PheWAS codes.
dataset <- read.csv2(system.file("extdata",
"nhdsSubset.csv",
package="EHRtemporalVariability"),
sep = ",",
header = TRUE,
na.strings = "",
colClasses = c( "character", "numeric", "factor",
"numeric" , rep( "factor", 22 ) ) )
datasetPheWAS <- icd9toPheWAS( data = dataset,
icd9ColumnName = "diagcode1",
missingValues = "N/A",
replaceColumn = TRUE,
statistics = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.