s-news
[Top] [All Lists]

Re: Reading Dichotomous Data as a Matrix

To: Ahmet Turhan <att3380@garnet.acns.fsu.edu>, s-news@lists.biostat.wustl.edu
Subject: Re: Reading Dichotomous Data as a Matrix
From: "Richard M. Heiberger" <rmh@temple.edu>
Date: Sun, 25 Sep 2005 12:32:09 -0400
> Date: Sat, 24 Sep 2005 16:37:35 -0400
> From: "Ahmet Turhan" <att3380@garnet.acns.fsu.edu>
> Subject: [S] Reading Dichotomous Data as a Matrix in Splus 
> To: <s-news@lists.biostat.wustl.edu> 
> 
> Is there any easy way to read a dichotomous response data as matrix such
> that each column is a variable? 
> 
> An example data set is
> 1011111000011
> 1001110001111
> 1011111000011
> 1001110001111
> 
> Thank you,
> 
> A. Turhan


## In S-Plus use
example <- read.table("example.dat", sep=1:13)


## In R use
example <- read.fwf("example.dat", widths=rep(1,13))

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Reading Dichotomous Data as a Matrix, Richard M. Heiberger <=