[R] how to read this data file into R?

David Winsemius dwinsemius at comcast.net
Wed Feb 3 00:29:18 CET 2010


If that is the way the data were coming in ... as an irregularly  
arranged matrix with , I would cut and paste into a text editor, even  
up the rows, paste into the OpenOffice.org spreadsheet using the fixed  
width option, trim out the unwanted row names and column names, and  
then "Save as.." a .csv file.

-- 
David.

On Feb 2, 2010, at 5:55 PM, song song wrote:

>           [,1]      [,2]     [,3]     [,4]     [,5]     [,6]     [,7]
> [,8]
>  [1,] 2.010061 -5.223624 2.010061 2.010061 1.463336 1.463336 2.010061
> 2.010061
>  [2,] 2.057502 -5.101445 2.057502 2.057502 2.057502 2.057502 2.057502
> 2.057502
>  [3,] 2.011081 -5.227745 2.011081 2.011081 2.011081 2.011081 2.011081
> 2.011081
>  [4,] 2.031695 -5.147776 2.031695 2.031695 2.031695 2.031695 2.03169

> snipped

> [23,]  2.00596350 2.0059635 -5.195960 2.005964 -1.791538434   
> 0.02761610
> [24,]  1.96648770 1.9664877 -5.195960 1.966488  0.642854756   
> 0.11557730
> [25,]  1.92247274 1.9224727 -5.132915 1.922473 -5.132915158   
> 1.92247274
> <data example.txt>______________________________________________
> 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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list