Hi Dani,
see ?combn .

combn(1:50,2)
gives you all combinations as matrix.
you can do sth like

apply(combn(1:50,2),2, paste, sep="", collapse="")

to get concatenated results.

hth.

Dani Valverde schrieb:
Hello,
I have a sequence of numbers:
seq(1:50)
and I would like to have all the possible combinations with this numbers without repeating any combination:
11, 12, 13, ... ,22,23,24,...
How can I do it?
Best,

Dani


--
Eik Vettorazzi
Institut für Medizinische Biometrie und Epidemiologie
Universitätsklinikum Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/42803-8243
F ++49/40/42803-7790

______________________________________________
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.

Reply via email to