选择了michiganCoxSurv和未定义的列

问题描述

我有一个输入文件,试图匹配软件包给出的示例(针对MWE修剪)

数据

structure(list(ID_1 = 1:4,ID_2 = c("MZGVVGDE","MZDBADNE","ZBAZDCC","ZBCBEAAZ"),event = c(0L,0L,0L),age = c(44L,62L,67L,58L),age_diagnosis = c(40L,57L,54L,5L)),class = "data.frame",row.names = c(NA,-4L))
ID_1 ID_2 event age age_diagnosis
1 MZGVVGDE 0 44 40
2 MZDBADNE 0 62 57
3 ZBAZDCC 0 67 54
4 ZBCBEAAZ 0 58 5

和R代码(针对MWE进行了整理)

michiganCoxSurv(vcf.file=vcf.file,covariate.file=pheno.file,id.column="ID_2",sample.ids=sample.ids,time.to.event="time",event="event",covariates=c("age_diagnosis"),inter.term=NULL,print.covs="only",out.file="michigan_only",r2.filter=0.3,maf.filter=0.005,chunk.size=100,verbose=TRUE,clusterObj=NULL)

产生输出:

Analysis started on 2020-08-11 at 15:10:18
Covariates included in the models are: age_diabetes_diagnosis
Error in `[.data.frame`(pheno.file,c(id.column,time.to.event,event,: 
  undefined columns selected
Calls: michiganCoxSurv -> coxPheno -> [ -> [.data.frame
Execution halted

如何解决此错误?

解决方法

您有time.to.event="time"。 pheno.file中没有名为time的列。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...