Skip to content

reading a dense file of binary number

4 messages · Brian Tsai, R. Michael Weylandt, Jorge I Velez +1 more

#
Would readLines() work?

Michael
On Tue, Oct 18, 2011 at 3:09 PM, Brian Tsai <btsai00 at gmail.com> wrote:
#
Or do you want each number separated?
+ 101010010111110
+ 010010100100000"
+ )
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15
[1,]  0  1  0  1  0  1  0  0  1   1   1   0   1   0   1
[2,]  1  0  1  0  1  0  0  1  0   1   1   1   1   1   0
[3,]  0  1  0  0  1  0  1  0  0   1   0   0   0   0   0


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Jorge I Velez
Sent: Tuesday, October 18, 2011 2:15 PM
To: Brian Tsai
Cc: r-help at r-project.org
Subject: Re: [R] reading a dense file of binary number

Hi Brian,

Take a look at ?scan
Read 3 items
[1] "010101001110101" "101010010111110" "010010100100000"
[,1]
[1,] "010101001110101"
[2,] "101010010111110"
[3,] "010010100100000"

HTH,
Jorge
On Tue, Oct 18, 2011 at 3:09 PM, Brian Tsai <> wrote:

            
______________________________________________
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.