s-news
[Top] [All Lists]

Re: alarm

To: <s-news@lists.biostat.wustl.edu>
Subject: Re: alarm
From: "Dave Cacela" <DCacela@stratusconsulting.com>
Date: Tue, 8 Jan 2008 13:06:59 -0700
Thread-index: AchR6GvFpik9Z4V4QvqYBaeUmcLEHQASLtrw
Thread-topic: [s-news] S-News Daily Digest V2 #1767
Dennis,

Here is a solution that works for me (splus 7 pro / windows xp).

mybells _ function(ntimes = 3, soundfile = "C:/WINDOWS/Media/ding.wav")
{
        for(k in c(1:ntimes)) {
                countdown <- ntimes - k
                mycall <- paste("sndrec32 /play /close", soundfile)
                system(mycall)
                print(paste("mybells  countdown:", countdown))
        }
        return(NULL)
}
mybells()

Hope this helps...
dc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dave Cacela             303-381-8000 (voice)
Managing Scientist      303-381-8200 (fax)
Stratus Consulting     
PO Box 4059
1881 Ninth St
Boulder, Colorado 80302 
mailto://dcacela@stratusconsulting.com
http://www.stratusconsulting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

----------------------------------------------------------------------

Date: Mon, 7 Jan 2008 06:05:29 -0800
From: Dennis Fisher <fisher@plessthan.com>
To: s-news@lists.biostat.wustl.edu
Subject: R "alarm"
Message-ID: <9A848FAF-50AA-4EBB-A404-BE1620C78E26@plessthan.com>

Colleagues,

I recently discovered that R permits the user to generate a beep with  
the command alarm() or cat("\a").  I can't find a command comparable  
to alarm() is Splus 8 and cat("\a") yields an error message.  Is there  
a work-around available in S-plus?

Dennis

Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
Fax: 1-415-564-2220
www.PLessThan.com


<Prev in Thread] Current Thread [Next in Thread>
  • Re: alarm, Dave Cacela <=