[R] permutations

Eiger c_cb at hotmail.it
Sat Oct 10 20:09:19 CEST 2009


Hi, I have a question about "how" write output in a .txt file.

With tihs command, I write permutations of the numbers (1,2,3) in a .txt
file:

> x<-permn(c(1,2,3))
> write.table(x, file="filename.txt", row.names=F, col.names=F)

This is output in filename.txt:

1 1 3 3 2 2
2 3 1 2 3 1
3 2 2 1 1 3
____________________________________
Is possible write output trasposed?
Output:



etc..
____________________________________
Is possible write output in a single column?
Output:
1
2
3
1
3
2
3
1
2
etc. etc.
_____________________

Thanks,
E.



-- 
View this message in context: http://www.nabble.com/permutations-tp25834463p25836847.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list