[R] read a irregular text file data into dataframe()

Petr Klasterecky klaster at karlin.mff.cuni.cz
Sat Mar 10 08:42:33 CET 2007


read.table("c:\\test.txt",fill=TRUE)

Petr

j.joshua thomas napsal(a):
> I am using R2.4.1 calling a text file contains the following data structure:
> 
> when i call the file into R using
> 
> tData<-read.table("c:\\test.txt")
> 
> it gave me Error saying, irregular column in the data set
> however i need to use the below type of data
> 
> Is there any alternative in R?
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 0010 0028 0061 0088
> 0010 0042 0084
> 0004 0010 0055
> 0010 0018 0040 0042
> 0010 0046 0059
> 0010 0016 0042 0055
> 0010 0012 0018 0054
> 0010 0034 0042 0102
> 0081
> 0001 0076 0085
> 0080 0086
> 0017 0032 0081
> 0004 0010 0055
> 0010 0042 0061 0080
> 0010 0017 0078 0084
> 0006 0010 0040 0042
> 0075 0080
> 0005 0028 0032
> 0006 0010 0040 0061

-- 
Petr Klasterecky
Dept. of Probability and Statistics
Charles University in Prague
Czech Republic



More information about the R-help mailing list