Did you check what comes out x$fstatistic[1L] etc... ? Seems to me at least
one of those is not a number.

Please give ready-to-use code, nobody here will transform your mail to a
text file, try to read it in and so on. Also specify which package you use,
lmList is not a standard function in R and occurs in at least 2 packages
(lme4 and nlme).

Cheers
Joris

On Mon, Apr 26, 2010 at 9:22 AM, newbie_2010 <girishbogu@gmail.com> wrote:

>
> 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.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Joris Meys
Statistical Consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

Coupure Links 653
B-9000 Gent

tel : +32 9 264 59 87
Joris.Meys@Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

	[[alternative HTML version deleted]]

