think tank forum

general discussion » Random Scripts and Stuff

Fsmart's avatar
16 years ago
r2, link
Fsmart
#An Alarm clock script for R. :) yes a statistical computing package. now it will wake you up.
# oh joy! to run: paste this code into R and then call the function by typing ALARM("HH:MM") and
# R will beep you into glorious wakefulness!

ALARM <- function(alarm.ring = "12:00"){ #default wake up time is 12 :)
#include two digits and colon when choosing a time
alarm.activated <- 0 ; last_second <- 0

while (alarm.activated==0) {
if (substr(Sys.time(),12,16)==alarm.ring) { print("wake up") ; alarm.activated <- 1}
}

while (alarm.activated==1) {

if (substr(Sys.time(),18,25)!=last_second) {alarm();last_second = substr(Sys.time(),18,25)}

}
}
Fsmart's avatar
16 years ago
r1, link
Fsmart
darn it didn't work :( ... that is wake me up
lucas's avatar
16 years ago
r1, link
lucas
i ❤ demo
for next time: the technology forum

we need more admin scripts.
Fsmart's avatar
16 years ago
r1, link
Fsmart
damn. I hate when that happens
lucas's avatar
16 years ago
r1, link
lucas
i ❤ demo
i unarchived your first two posts. please don't try to move a thread again. it doesn't work. :o

thread is eternity
Fsmart's avatar
16 years ago
link
Fsmart
:(
andre's avatar
15 years ago
link
andre
I will ressurect this thread just to say I hate R.
andre's avatar
15 years ago
link
andre
I mean, it's awesome and I do all my plotting with it but still my life sucks whenever I have to use it.
Carpetsmoker's avatar
15 years ago
link
Carpetsmoker
Martin
http://carpetsmoker.net/code/
bluet's avatar
15 years ago
link
bluet
You used my photo! :D