[R] R error- "more columns than column names"

Erik Iverson eriki at ccbr.umn.edu
Wed Feb 24 23:13:14 CET 2010


I had a comment character "#" in my header names earlier today that 
threw this error.

Euphoria wrote:
> Hi all! I am desperately trying to figure out the solution to this error, but
> nothing as of yet is working.  
> 
> As noted in an earlier post I am using GenABEL.  In an attempt to read in
> the phenotype file, in the format .dat, R keeps giving me the error "more
> columns than column names"
> 
> I have tried to read in the data without the headers; I have also tried to
> trim the data to remove any trailing tabs or spaces but it doesn't solve the
> problem.  All missing values have been replaced with "NA", and all data
> seems to have matching corresponding header value - each column has a
> matching column name.
> 
> What could be the possible underlying problem? I have tried to problem-solve
> but clearly I am at a loss. Thanks for your help! 
> 
> Code:
>  mix <- load.gwaa.data (phe = "Z:/CCFPhenotypesTAB.dat", gen =
> "pedmap-0.raw", force = T)



More information about the R-help mailing list