[R] problem with read.table()

Philipp Pagel p.pagel at wzw.tum.de
Wed Jul 30 11:53:25 CEST 2008


>   Table<-read.table("Table.txt",header=TRUE,row.names=1, na.strings="NA"
> ,colClasses = Classe82)
> 
> 
>   Fehler in scan(file, what, nmax, sep, dec, quote, skip, nlines,
> na.strings,  : 
>   scan() erwartete 'a real', bekam '8,5'
> 
>   Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, 
> : 
>   scan()  expected 'a real', got '8,5'

It looks like your tab separated file uses ',' as a decimal point
(german convention) while read.table expects '.'. Try giving the dec=","
option to read.table.

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://mips.gsf.de/staff/pagel



More information about the R-help mailing list