[R] importing text file with duplicate rows / indexing rows and columns

About this list Date view Thread view Subject view Author view Attachment view

From: grr@grell.mailshell.com
Date: Sun 16 May 2004 - 13:40:41 EST


Message-id: <1084678841.40a6e2b9ea61c@www.mailshell.com>

Could somebody advise me about importing a txt file as a frame? I am using the command:

test <- read.delim ("~/docs/perl/expr_ctx.txt2", header=T, sep = "\t", row.names = 1)

This gives me an error because there are duplicate rows.

In the txt file, the columns are unique subjects and the rows are variables, so I had planned to transform the file after importing. The first row and column are text labels, which I could either leave in (with duplicate rows) or ask R to remove for me, saving another file with index values. But I can't figure out how to do either of these things.

Thanks for any help,

Graham

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST