[R] Data separated by spaces, getting data into R using fiel

(Ted Harding) Ted.Harding at manchester.ac.uk
Tue Sep 8 18:12:16 CEST 2009


Lauri,
Having looked at your example file, and examined its byte-by-byte
content, it is a plain ASCII file which gives exactly the same layout
as you originally posted. This, along with the field-width information
you originally supplied, is not sufficient to determine a
unique dcomposition into fields. See my previous reply!

I think I have to go along with Barry here: In my view, no further
progress is possible without seeing an excerpt (the first few lines,
or a few lines that cause the problem), from the *original* file.
Even then, no further progress may be possible!

And, just to make sure of things, do not use a "copy & paste" method
of extracting the sample lines -- as Barry points out, it is possible
for a tab to get copied as a space.

So the best way is to make a copy of the original file, and use a
test editor to delete unwanted lines from the copy, so that the bytes
in the sample file are a subset of the bytes from the original, and
not something they have been translated into.

And, by the way, what operating system are you using?

Ted.

On 08-Sep-09 15:47:55, Lauri Nikkinen wrote:
> This is the file (see the attachment) that represents the problem I'm
> facing with the original file. I'm looking for some generic way to
> solve this problem. Thank you for your time.
> 
> -L
> 
> 2009/9/8 Barry Rowlingson <b.rowlingson at lancaster.ac.uk>:
>> On Tue, Sep 8, 2009 at 1:52 PM, Lauri Nikkinen<lauri.nikkinen at iki.fi>
>> wrote:
>>
>>> But this is not the solution I was looking for. Thanks.
>>
>> _I think the only way you'll get the solution you are looking for is
>> if you can let us have a copy of the original input file, or at least
>> the first few lines - and not pasted into an email because special
>> characters like spaces and tabs get smushed up and confuse things.
>>

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 08-Sep-09                                       Time: 17:12:12
------------------------------ XFMail ------------------------------




More information about the R-help mailing list