[R] Odp: read.table (again)
Petr PIKAL
petr.pikal at precheza.cz
Wed Nov 4 11:15:27 CET 2009
Hi
try to look at read.fwf.
Regards
Petr
r-help-bounces at r-project.org napsal dne 04.11.2009 11:03:06:
> Dear R commnuity,
>
> Thanks a lot for your help.
> I want to read in tables, the problem is that the table is composed in a
> difficult way. In ariginal it looks like this:
>
> 669 736 842101610481029114711811166124312081128117611221026 9581024 992
> 685 720 829 925 995 96010241057116611501104106410711092 983 908 989 904
> 924 896 882 897 909 933 928 907 916 902
> 546 734 784 868 970 954 99210061012101610481045 9821057 989 914 956 960
> 948 947 949 939 916 950
> 562 598 771 827 941 922 905 877 860 862 931 952 954 977 960 901 978 975
> 970 950 973 953 958 931 912
> 558 593 725 786 884 866 838 797 815 802 809 822 853 833 863 852 903
> 9861015 9841019 993 955 932 918 874 518 580 600 764 834 804 814 824 849
> 831 939 757 769 790 809 892 89810251028104410371018 985 932
> 478 559 585 696 812 812 811 867 854 811 814 818 793 760 814 976
> 957104510551067106410501005 948
> 465 528 567 619 703 828 824 830 851 824 823 873 826 787 787
> 9791048105710621083108910841027 944
>
> That is, that every 4 digits there is a new number, but when the number
> is > 999, R thinks of course that the number consists of more than 4
> digits. So, R can't read in the table.
> Is there a way I can tell R, that every 4 digits, a new number begins?
> I treif different things with "sep".
> data <- read.table ("RA19930101.txt",header=F,sep=)
>
> Thanks for your help again in this topic.
> Sybille
>
>
>
>
> --
> -------------------------------------------------
> UDATA Umweltschutz und Datenanalyse
> Hydrologie, Klimafolgenforschung, Boden- und Grundwasserschutz
> carl-Schüllerstr. 30 1/3 95444 Bayreuth<<
> www.udata.de
>
> Tel. 0921/78638573 (Durchwahl)
> wendel at udata.de
>
> Firmensitz: Neustadt an der Weinstraße
> Inhaber: Dr. Jörg Scherzer
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list