Hi everyone, I did my homework and read the posting guideline :-) I want to eMail the results of a computing automatically. So I get the results (the parameters of a garch process) and I want to eMail them to another person. How can I do that? Thx ______________________________ Thomas Schwander MVV Energie Konzern-Risikocontrolling Telefon 0621 - 290-3115 Telefax 0621 - 290-3664 E-Mail: Thomas.Schwander@mvv.de . Internet: www.mvv.de MVV Energie AG . Augustaanlage 67 . 68159 Mannheim Handelsregister-Nr. HRB 1780, Amtsgericht Mannheim Vorsitzender des Aufsichtsrates: Oberbürgermeister Gerhard Widder Vorstand: Dr. Rudolf Schulten (Vorsitzender) . Dr. Werner Dub . Hans-Jürgen Farrenkopf [[alternative HTML version deleted]]
We use a program called Blat (www.blat.net) on Windows to email out results of overnight runs. If you're on Unix/Linux you can definitely do a similar thing using one of the hundreds of command line utils. The R code is similar to below: sendEmail <- function(from, to, subject, body) { BLAT <- "PATH TO BLAT.EXE" MAILSERVER <- "your mail server here"; command <- paste(BLAT, "-", "-to", dQuote(to), "-server", MAILSERVER, "-s", dQuote(subject), "-f", dQuote(from)) system(command, input=body) } HTH, John Scillieri -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of thomas.schwander at mvv.de Sent: Thursday, July 12, 2007 9:53 AM To: r-help at stat.math.ethz.ch Subject: [R] eMail results out of R Hi everyone, I did my homework and read the posting guideline :-) I want to eMail the results of a computing automatically. So I get the results (the parameters of a garch process) and I want to eMail them to another person. How can I do that? Thx>>> This e-mail and any attachments are confidential, may contain legal,professional or other privileged information, and are intended solely for the addressee. If you are not the intended recipient, do not use the information in this e-mail in any way, delete this e-mail and notify the sender. CEG-IP2
On 7/12/2007 9:52 AM, thomas.schwander at mvv.de wrote:> Hi everyone, > > I did my homework and read the posting guideline :-) > > I want to eMail the results of a computing automatically. So I get the results (the parameters of a garch process) and I want to eMail them to another person. How can I do that?This will depend on the system you're using. If the command "emailit" would work from the command line on your system, then system("emailit") should work from within R. Writing that command is the hard part, of course. Duncan Murdoch
On 12-Jul-07 13:52:56, thomas.schwander at mvv.de wrote:> Hi everyone, > > I did my homework and read the posting guideline :-) > > I want to eMail the results of a computing automatically. So I get the > results (the parameters of a garch process) and I want to eMail them to > another person. How can I do that? > > ThxAs well as the answers from John Scillieri and Duncan Murdoch: if it does happen that you're using a Unix/Linux system, then the appropriate variant of the following illustration will work (the 'mail' command should always be present on variants of these systems): In the little project I'm working on in R at the moment, I have variables x1 and x2 (each length-50 numeric vectors). So I can, in R, do: sink(file="myoutput") cbind(x1,x2) sink() system("mail ted -s \"Test No 2\" < myoutput") which has stored the 2-column output from cbind(x1,x2) in the file "myoutput", and then used the 'mail' command to mail its contents to 'ted' with subject 'Test No 2' (I used a multi-word subject to illustrate the quotes the command line will need, to avoid splitting the subject into separate tokens). See ?sink for how to use the sink() command. Then 'ted' duly received an email with contents: ==========================================Date: Thu, 12 Jul 2007 17:10:44 +0100 From: Ted Harding <ted at compo.fort.knox.uk> To: ted at compo.fort.knox.uk Subject: Test No 2 x1 x2 [1,] 0.37282844 0.002743146 [2,] 0.93293155 -0.108009247 ....... [49,] -0.08681427 0.828313288 [50,] -0.23621908 0.385269729 ========================================== You can of course encapsulate something like the above sequence of commands into an R function, depending on how you organise the storage of the results you want to email. Hoping this helps, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 12-Jul-07 Time: 17:25:05 ------------------------------ XFMail ------------------------------