on 11/20/2008 02:28 PM Tul Gan wrote:
> Hi !
> �� I am new to R. Can somebody help me in reformatting�huge output
> files ,i.e, rearranging sets of columns in specific order.
> For example: I have data for three compunds 1, 2 and 3
> file1:
> ID CA1 CA3 CA2 MA2 MA1 MA3
> 1 14 15 13 7 12 3
> txt <- "ID CA1 CA3 CA2 MA2 MA1 MA3
+ 1 14 15 13 7 12 3
+ 2 19 7 12 10 14 5
+ 3 21 12 19 6 8 9 "
> dta <- read.table(textConnection(txt), header=TRUE)
> dta
ID CA1 CA3 CA2 MA2 MA1 MA3
1 1 14 15 13 7 12 3
2 2 19 7 12 10 14 5
3 3 21 12 19 6 8 9
>
# use [ , ] with a
2 matches
Mail list logo