ukbtools icon indicating copy to clipboard operation
ukbtools copied to clipboard

ukb_icd_freq_by error

Open zaeemhadi opened this issue 11 months ago • 0 comments

Hi,

Using the below command,

ukb_icd_freq_by(all_data, reference.var = "sex_f31_0_0", n.groups = 10,icd.code = c("^(F00)","^(F01)","^(F02)"), icd.labels = c("disease1", "disease2","disease3"), plot.title = "", legend.col = 1, legend.pos = "right", icd.version = 10, freq.plot = FALSE, reference.lab = "Reference variable", freq.lab = "UKB disease frequency")

I get the following error

Error in if (!(icd.code == c("^(I2[0-5])", "^(I6[0-9])", "^(J09|J1[0-9]|J2[0-2]|P23|U04)"))) { : the condition has length > 1

I can't seem to understand the problem.

zaeemhadi avatar Mar 23 '24 05:03 zaeemhadi