#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)}
}
}
darn it didn't work :( ... that is wake me up
for next time:
the technology forum
we need more admin scripts.
damn. I hate when that happens
i unarchived your first two posts. please don't try to move a thread again. it doesn't work. :o
thread is eternity
:(
I will ressurect this thread just to say I hate R.
I mean, it's awesome and I do all my plotting with it but still my life sucks whenever I have to use it.
You used my photo! :D