[R] Error in pf(q, df1, df2, lower.tail, log.p) : Non-numeric argument to mathematical function

newbie_2010 girishbogu at gmail.com
Mon Apr 26 09:22:09 CEST 2010


inputfille
snpid	indid	genotype	gvariable	probeid	gene	geneexpression
rs1040480	CHB_NA18524	C/T	2	GI_19743926-I	PTPRT	5.850586
rs1040480	CHB_NA18526	C/C	1	GI_19743926-I	PTPRT	6.028641
rs1040480	CHB_NA18529	C/C	3	GI_19743926-I	PTPRT	5.944392
rs1040481	CHB_NA18532	C/C	1	GI_19743926-I	PTPRT	5.938578
rs1040481	CHB_NA18537	C/C	2	GI_19743926-I	PTPRT	5.874439
rs1040481	CHB_NA18540	C/C	3	GI_19743926-I	PTPRT	5.915231

output
rs1040480   pvalue:0.39 or something like that
rs1040481   pvalue:0.02...

error
Error in pf(q, df1, df2, lower.tail, log.p) : 
  Non-numeric argument to mathematical function

script I'm  using

 data1<-read.table("C:\\Documents and
Settings\\bogugk\\Desktop\\Update_Rory\\A_G_without_NN_Results.txt",
header=TRUE)
 fm <- lmList(geneexpression~gvariable|snpid,data=data1)
  get.pval <- function(z) {
   x <- summary(z)
  pf(x$fstatistic[1L], x$fstatistic[2L], x$fstatistic[3L], lower.tail =
FALSE)
 }
 sapply(fm,get.pval)


Needed output
snpid          gene       pvalue
rs1040480   PTPRT     0.39
rs1040481   PTPRT     0.02

-- 
View this message in context: http://r.789695.n4.nabble.com/Error-in-pf-q-df1-df2-lower-tail-log-p-Non-numeric-argument-to-mathematical-function-tp2064801p2064801.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list