scanone Error "Following phenotypes are not numeric: Column"

419 views
Skip to first unread message

Jeevan Karloss

unread,
Dec 6, 2011, 4:26:35 PM12/6/11
to rqtl...@googlegroups.com
Hello, 

When I run the following code, I get the below error. 

Code:
data.1D <- scanone(cross=data, chr=c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"), pheno.col=c(2:85), model="np", use="complete.obs")

Error:
Error in checkcovar(cross, pheno.col, addcovar, intcovar, perm.strata,  : 
  Following phenotypes are not numeric: Column

But when I read the same file using read.csv, that shows all the data in the file are numeric. 

May be its a simple novice question. 

Jeevan

--
-----------------------------------------------------------------------------------------------------------------------------
"The Horse is made ready for the day of battle. But victory rests with the
LORD ". Proverbs 21:31
    
"If any of you lacks wisdom, he should ask God, who gives generously to all
without finding fault, and it will be given to him." James 1:5

"And we know that all things work together for good to those who love God,
to those who are called according to His purpose." Rom 8:28 
-----------------------------------------------------------------------------------------------------------------------------

Karl Broman

unread,
Dec 6, 2011, 5:11:13 PM12/6/11
to rqtl...@googlegroups.com, Jeevan Karloss
At least one of the phenotype columns was interpreted as a factor rather than numeric.

If you try:

which(!sapply(data$pheno, is.numeric))

that should tell you which columns are not numeric, which might help.

For example:

data(hyper)
which(!sapply(hyper$pheno, is.numeric))

Note that it's best not to use 'data' as the name of your data, since that is an important R function.

If you send me your .csv data file (privately, to kbr...@biostat.wisc.edu), I could give you more detailed help.

karl

> --
> You received this message because you are subscribed to the Google Groups "R/qtl discussion" group.
> To post to this group, send email to rqtl...@googlegroups.com.
> To unsubscribe from this group, send email to rqtl-disc+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rqtl-disc?hl=en.

Reply all
Reply to author
Forward
0 new messages