[R] import data troubles

STOLIAROFF VINCENT VINCENT.STOLIAROFF at sgam.com
Thu Nov 6 12:04:20 CET 2003


HI R lovers,

I have been facing a petty trouble with datas' import :

I have a plain txt file (see attached file or the copy below) that I cannot
read either with scan or read.table


> scan(file="F:/Alt/HDG/Stoliaroff/Data/test.txt")
Error in scan(file = "F:/Alt/HDG/Stoliaroff/Data/test.txt") : 
        "scan" expected a real, got "ÿþ6"

> read.table(file="F:/Alt/HDG/Stoliaroff/Data/test.txt")
    V1
1  ÿþ6
2   \n
3    6
4    4
5    5
6    3
7    3
8   \n
9    6
10   4
11   5
12   3
13   3
14  \n
15   6
16   4
17   5
18   3
19   2
20  \n
21   6
22   4
23   5
24   3
25   2
26  \n
27 



My file is as simple as:

62.5000	47.5048	56.8500	36.4700	32.4500	
62.1500	47.0952	55.0500	35.5600	30.1500	
61.3300	45.2476	53.6500	34.8200	29.4900	
61.6600	46.2286	53.8500	35.2000	30.6400	
62.0000	47.3714	54.4400	35.1100	30.1600	
60.8500	46.7143	52.9900	34.4200	29.3400	
61.0900	46.4381	52.7600	33.9600	29.1000	
	

 <<test.txt>> 		

Does anybody have an idea of the cause of my problem?

Besides, I'd like to know if there is a function for importing datas from
excel file? I cannot find one...

Thanks a lot for any help
Sorry for my poor english and the possible irrelevancy of my questions

Vincent



*************************************************************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. 
Tout message electronique est susceptible d'alteration. 
SG Asset Management et ses filiales declinent toute responsabilite au titre
de ce message s'il a ete altere, deforme ou falsifie.

Découvrez l'offre et les services de SG Asset Management sur le site
www.sgam.fr 

				********

This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration.   
Neither SG Asset Management nor any of its subsidiaries or affiliates shall
be liable for the message if altered, changed or falsified. 

*************************************************************************



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.txt
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20031106/f39ae182/test.txt


More information about the R-help mailing list