Hi Eiger, Here a suggestion to get the output in the format you want: # Package, data and path require(combinat) x <- do.call(rbind,permn(c(23,46,70,71,89))) f <- "C:/permutations.txt"
# Original output write.table(x, f, col.names = F, row.names = F) # Transposed output write.table(t(x), "C:/transpermutations.txt", col.names = F, row.names = F) HTH, Jorge On Sun, Oct 11, 2009 at 7:04 AM, Eiger <> wrote: > > > jholtman wrote: > > > > try this to get the column output: > > > > cat(x, sep='\n', file='/tempxx.txt') > > > > > > Thanks for your answer. > I've tried the command "cat" , but give me this error: > > > x<-permn(c(2,3,5,7)) > > > cat(x, file="/my_path/filename.txt","\n") > > Error in cat(list(...), file, sep, fill, labels, append) : > argument 1 (type 'list') cannot be handled by 'cat' > > -- > View this message in context: > http://www.nabble.com/permutations-tp25834463p25842437.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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. > [[alternative HTML version deleted]] ______________________________________________ R-help@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.