Skip to content

read.data? without separator

3 messages · Fror, jim holtman, Greg Snow

#
Hello,

I have a problem with read.data. For example I have a file

# comment
1?0001010101
101010??1010

with comment on first line and data layout without separator. How I could
read data that each character\sign was in another column. It is trivial
probably, but I have no idea for it.

Thank's,
Kacper
#
I have a problem with 'read.data' also in that I don't see that as a
function in the 'base'; I assume you meant read.table.

Also you did not indicate is all the lines were the same length.  Here
is a solution to return a list is each character broken out
separately.
+ 1?0001010101
+ 101010??1010"))
[[1]]
 [1] "1" "?" "0" "0" "0" "1" "0" "1" "0" "1" "0" "1"

[[2]]
 [1] "1" "0" "1" "0" "1" "0" "?" "?" "1" "0" "1" "0"
On Sun, Dec 26, 2010 at 1:04 PM, Fror <fror at interia.pl> wrote:

  
    
#
Would the read.fwf function work for you?