[R] problem with read.table

Pedro Rodrigues prodrigues at dcc.fc.up.pt
Mon Jul 19 11:08:42 CEST 2004


If your file looks like attached, you should call

read.table("temp.txt", header=TRUE, sep="\t", skip=3, quote="")



On Mon, 2004-07-19 at 09:43, Vincent MUTEAUD wrote:
> Thanks for your quick answer but I don't see the escape character "\n" in 
> "myFile" I see it on the result of my R command.
> 
> This is an extract of myFile:
> 
> # Capsis 4.1.3 generated file - Mon Jul 19 10:39:56 CEST 2004
> 
> 
> varName 
> weighting       id      date    x       y       z       calculated 
> observed
> Date de 
> débourrement    0.0     tree1   1998/365a       1.5     1.5     0.0     158 
>      162
> Diamètre du 
> tronc       0.0     tree1   0/0a    1.5     1.5     0.0 
> 0.0062422542832791805   0.007
> Diamètre du 
> tronc       0.0     tree1   1998/365a       1.5     1.5     0.0 
> 0.010381871834397316    0.011
> Hauteur totale de 
> l'arbre       0.0     tree1   0/0a    1.5     1.5     0.0     1.0     0
> 
> 
> 
> I don't know why "\n" appears in R.
> 
> 
> A 10:40 19/07/2004 +0200, asemeria at cramont.it a écrit :
> 
> >You should'nt see the escape character "\n" on "myfile".
> >Try deleting with a text editor "\n"
> >A.S.
> >
> >----------------------------
> >
> >Alessandro Semeria
> >Models and Simulations Laboratory
> >Montecatini Environmental Research Center (Edison Group),
> >Via Ciro Menotti 48,
> >48023 Marina di Ravenna (RA), Italy
> >Tel. +39 544 536811
> >Fax. +39 544 538663
> >E-mail: alessandro.semeria at cramont.it
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
-------------- next part --------------
# Capsis 4.1.3 generated file - Mon Jul 19 10:39:56 CEST 2004


varName	 weighting	id	date	x	y	z	calculated	observed
Date de débourrement	0.0	tree1	1998/365a	1.5	1.5	0.0	158	162
Diamètre du tronc	0.0	tree1	0/0a	1.5	1.5	0.0	0.0062422542832791805	0.007
Diamètre du tronc	0.0	tree1	1998/365a	1.5	1.5	0.0	0.010381871834397316	0.011
Hauteur totale de l'arbre	0.0	tree1	0/0a	1.5	1.5	0.0	1.0	0


More information about the R-help mailing list