Sha256: dcb37e2c3ac029cf44fc68e17af601b972e9f3884d514d0de2c71a136560218e
Contents?: true
Size: 399 Bytes
Versions: 219
Compression:
Stored size: 399 Bytes
Contents
handshake <- function(n) { # 1 = wink # 10 = double blink # 100 = close your eyes # 1000 = jump # 10000 = reverse actions <- c("wink", "double blink", "close your eyes", "jump") bin <- intToBits(n) events <- c() for (i in 1:4) { if (bin[i] > 0) { events <- c(events, actions[i]) } } if (bin[5] > 0) { events <- rev(events) } events }
Version data entries
219 entries across 219 versions & 1 rubygems