very cool coding style [Regulatives / Guidelines]

posted by ElMaestro  – Denmark, 2012-06-16 21:12 (5113 d 02:57 ago) – Posting: # 8762
Views: 15,173

Hi HS,

while (sum(x) != 0) x <- sign(rnorm(size))


a little off topic, but it took me some time to get my head around this code line of yours. Now that I (think I) get it, I must say this is an incredibly elegant way of achieveing a lot with minimum coding. It completely permutes equal numbers of TR and RT (or -1's and 1's). Very, very elegant style!!! Me likey! :cool::cool::cool:

Pass or fail!
ElMaestro

Complete thread:

UA Flag
Activity
 Admin contact
23,654 posts in 4,992 threads, 1,571 registered users;
91 visitors (0 registered, 91 guests [including 9 identified bots]).
Forum time: 00:09 CEST (Europe/Vienna)

Always listen to experts.
They’ll tell you what can’t be done and why.
Then do it.    Robert A. Heinlein

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5