[R] Calling an R Exit Function

Phil Rack PhilRack at minequest.com
Sat Dec 20 19:23:02 CET 2008


Thank You Sarah! With your help, I was able to use the .Last function along
with

options (error = .Last)

to get what I wanted. So basically the new code that I need to add to my
process looks like:


.Last <- function() 
  { 
     cat("File Completed - WPS2R1 \n",file = "D:\\WPSWork\\WPS Temporary
Data\\_TD7204\\WPS2R.sem ",append=TRUE) 
  }

options (error = .Last)




Philip Rack
MineQuest, LLC
SAS & WPS Consulting and WPS Reseller
Tel: (614) 457-3714
Web: www.MineQuest.com
Blog: www.MineQuest.com/WordPress


-----Original Message-----
From: Sarah Goslee [mailto:sarah.goslee at gmail.com] 
Sent: 12/20/2008 9:40 AM
To: PhilRack
Cc: r-help at r-project.org
Subject: Re: [R] Calling an R Exit Function

What about .Last() ?
You can implement a system-wide version - I'm
assuming that is possible on Windows.

Sarah

On Sat, Dec 20, 2008 at 8:52 AM, PhilRack <philrack at minequest.com> wrote:
>
> I'm looking for advice and suggestions on how I might be able to implement
a
> routine when R exits. First, I'm running on Windows XP SP2 using R
2.7.1.[...]
-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list