library(data.table)
# Diabetes Info
dinfo <- fread("DiabetesInfo.tsv")
dinfo <- dinfo[, .(nPODCaseID, diabetes_Duration_yrs, dataSetsAge_At_Onset_QuerySnapshotAgeAtOnset, oppc_C_peptideR, oppc_HbA1cR, oppc_peakGluc)]
setnames(dinfo, c("ID", "db.duration", "age.onset", "Cpeptide", "HbA1c", "peak.gluc"))
dinfo[, ID := as.numeric(ID)]
dinfo <- dinfo[!is.na(ID)]
dinfo[Cpeptide == "Less than .05", Cpeptide := "0"] # The most likely value is 0
dinfo[Cpeptide == "Less than .02", Cpeptide := "0"] # The most likely value is 0
for(col in c("Cpeptide", "peak.gluc")) set(dinfo, j = col, value = as.numeric(dinfo[[col]]))
write.table(dinfo, "DiabetesInfo_ref.tsv", sep = "\t", row.names = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.