I have the same question that Eusebio had:

Is there a function similar to "sink" that redirect also R code to a
file that
is:

sink("R001")
x <- c(2,-6,-4,8,5,4,1,3,4,-9,0,1)
A <- matrix(x, ncol=3)
A
A.prima <- t(A)
A.prima
dim(A)
dim(A.prima)
sink()

create a file "R001" with contents:

------------------------------------------
     [,1] [,2] [,3]
[1,]    2    5    4
[2,]   -6    4   -9
[3,]   -4    1    0
[4,]    8    3    1
     [,1] [,2] [,3] [,4]
[1,]    2   -6   -4    8
[2,]    5    4    1    3
[3,]    4   -9    0    1
[1] 4 3
[1] 3 4

--------------------------------------------

and what I want is a file with:

--------------------------------------------
> x <- c(2,-6,-4,8,5,4,1,3,4,-9,0,1)
> A <- matrix(x, ncol=3)
> A
     [,1] [,2] [,3]
[1,]    2    5    4
[2,]   -6    4   -9
[3,]   -4    1    0
[4,]    8    3    1
> A.prima <- t(A)
> A.prima
     [,1] [,2] [,3] [,4]
[1,]    2   -6   -4    8
[2,]    5    4    1    3
[3,]    4   -9    0    1
----------------------------------------------
Any hint will be appreciated

Eusebio


Scott K. Cooley
Statistical Sciences, K6-08
Battelle--Pacific Northwest Division
Pacific Northwest National Laboratory
P.O. Box 999
Richland, WA  99352
Phone: 509-375-3604
FAX: 509-375-2604
Email: scott.cooley@pnl.gov 



	[[alternative HTML version deleted]]

