R pvalcombination的参数中存在错误

R pvalcombination的参数中存在错误,r,R,当我运行此代码时 wk = loadWorkbook("test.xlsx") df = readWorksheet(wk,sheet="Sheet1") df df<-t(df) #each row has a gene and each column has a person(healthy or ill) mdat1 <- matrix(df[1,1:52], nrow = 1,ncol = 52, byrow = TRUE) #matrix wi

当我运行此代码时

wk = loadWorkbook("test.xlsx")  
df = readWorksheet(wk,sheet="Sheet1")  
df 
df<-t(df) #each row has a gene and each column has a person(healthy or ill)          
mdat1 <- matrix(df[1,1:52], nrow = 1,ncol = 52, byrow = TRUE)
#matrix with the 1st gene in row and and people that express this gene for the 1st study 

mdat2 <-matrix(df[1,53:151], nrow = 1, ncol = 99, byrow = TRUE)
#matrix with the 1st gene in row and and people that express this gene for the 2nd study

mdat3 <- matrix(df[1,152:168], nrow = 1, ncol = 17,byrow = TRUE)
#matrix with the 1st gene in row and and people that express this gene for the 3rd study

mdat4 <- matrix(df[1,169:182], nrow = 1, ncol = 14,byrow = TRUE)
#matrix with the 1st gene in row and and people that express this gene for the 4th study

listgene1 <- list(mdat1,mdat2,mdat3,mdat4)  
listgene1  
#the 22th row  has 0 or 1 , 2 states 0 is ill and 1 is healthy 

f1 <-factor(df[22,1:52]) 
#factor with the 2 states for the 1:52 people from 1st study 

f2 <-factor(df[22,53:151])
#factor with the 2 states for the 53:151 people from 2nd study

f3 <-factor(df[22,152:168])
#factor with the 2 states for the 152:168 people from 3rd study 

f4 <-factor(df[22,169:182])
#factor with the 2 states for the 169:182 people from 4th study 

caselist <- list(f1,f2,f3,f4) 
pvalcombination(esets=listgene1,classes=caselist, moderated = c("t"),BHth = 0.05) 
wk=loadWorkbook(“test.xlsx”)
df=读取工作表(工作表=“工作表1”)
df

df通常这意味着您正试图采用向量的
行平均值(1:5)
。请把你的问题重复一遍,但我不想在我的代码中使用rowMean。我认为它与pvalcombination列表中使用的矩阵的维数不一致如果
listgene1
确实是
pvalcombination
的有效输入,那么您可以调用
debug(pvalcombination)
在调用
pvalcombination
之前,跟踪错误发生的位置或子函数,以及在该阶段达到的格式不合适的原因。@alexis_laz非常感谢,我会尝试一下,并让您知道它是否正常工作,这意味着您正在尝试采用向量的
rowMeans(1:5)
。请把你的问题重复一遍,但我不想在我的代码中使用rowMean。我认为它与pvalcombination列表中使用的矩阵的维数不一致如果
listgene1
确实是
pvalcombination
的有效输入,那么您可以调用
debug(pvalcombination)
在调用
pvalcombination
之前,跟踪错误发生在何处或在哪个子函数中,以及在该阶段达到的格式不合适的原因。@alexis_laz非常感谢您,我会尝试一下,并让您知道它是否有效