similar to: Determining the exit code of an "almost finished" R script

Displaying 20 results from an estimated 3000 matches similar to: "Determining the exit code of an "almost finished" R script"

2019 Jun 08
2
Determining the exit code of an "almost finished" R script
On Sat, Jun 8, 2019 at 2:13 PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > On 08/06/2019 7:42 a.m., Gergely Dar?czi wrote: > > Dear All, > > > > I'm using "reg.finalizer" in a function that is to be called in R scripts > > to do some cleanup on success. I have not found a way to run the function > > only if the script run without
2019 Jun 08
0
Determining the exit code of an "almost finished" R script
On 08/06/2019 9:55 a.m., Gergely Dar?czi wrote: > On Sat, Jun 8, 2019 at 2:13 PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: >> >> On 08/06/2019 7:42 a.m., Gergely Dar?czi wrote: >>> Dear All, >>> >>> I'm using "reg.finalizer" in a function that is to be called in R scripts >>> to do some cleanup on success. I have not
2019 May 03
2
mccollect with NULL in R 3.6
On Thu, May 2, 2019 at 7:24 PM Tomas Kalibera <tomas.kalibera at gmail.com> wrote: > > On 5/1/19 12:25 AM, Gergely Dar?czi wrote: > > Dear All, > > > > I'm running into issues with calling mccollect on a list containing NULL > > using R 3.6 (this used to work in 3.5.3): > > > > jobs <- lapply( > > list(NULL, 'foobar'), >
2012 Oct 19
3
saving to docx
hi all, how can i saving R output to docx or Jpeg format? [[alternative HTML version deleted]]
2019 Apr 30
2
mccollect with NULL in R 3.6
Dear All, I'm running into issues with calling mccollect on a list containing NULL using R 3.6 (this used to work in 3.5.3): jobs <- lapply( list(NULL, 'foobar'), function(x) mcparallel(identity(x))) mccollect(jobs, wait = FALSE, timeout = 0) #> Error in names(res) <- pnames[match(s, pids)] : #> 'names' attribute [2] must be the same length as the vector
2008 Sep 10
1
help: error handling in try
First time to post and searched archive for this problem with no clue. My version is 2.5.1. Below is a function to check if a given date is a valid date to a given date function object. It uses try (also tried tryCatch but with same problem). When given an invalid date, I am hoping try will generate en error message which would be picked up by the geterrmessage and thus expecting a false result.
2012 Apr 03
1
rpart error message
Hi R-helpers, I am using rpart package for decision tree using R.We are invoking R environment through JRI from our java application.Hence, the result of R command is returned in REXP and we use geterrMessage() to retrieve the error. When we execute the following command, cnr_model<-rpart(as.factor(Species)~Sepal Length+Sepal Width+Petal Length, method="class",
2012 Oct 31
1
Strange compiling behaviour
Compiling this little function gets me some strange behaviour .initDataDir <- function(){ if(file.exists(LOCATION)) { if(as.logical(file.info(LOCATION)["isdir"]))return stop(LOCATION, " exists but is not a directory") } Z <- dir.create(LOCATION) if(!Z){ stop(geterrmessage()) ## stop("Juggel") } return(Z) } > .initDataDir <-
2005 May 18
1
Testing for warning inside functions
I am looking for a way to get a warning message immediately after an evaluation within a function. To get error messages you can use geterrmessage(). But I found no function that allows me to check for warnings. Five years ago this questions has been posted but I haven't found any answer. Thanks for any help. Peter Wolf ------------ For illustration purpose a simple example follows: you
2016 Nov 11
2
Memory leak with tons of closed connections
On Fri, Nov 11, 2016 at 12:08 PM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: >>>>>> Gergely Dar?czi <daroczig at rapporter.net> >>>>>> on Thu, 10 Nov 2016 16:48:12 +0100 writes: > > > Dear All, > > I'm developing an R application running inside of a Java daemon on > > multiple threads, and
2018 Feb 22
0
Problem with geterrmessage()
Only the default error handler puts the error message in a buffer where it can be retrieved with geterrmessage. try() replaces the default error handler. Either look at the value returned by try() or use tryCatch with conditionMessage. Best, luke On Thu, 22 Feb 2018, Dennis Fisher wrote: > R 3.4.3 > OS X > > Colleagues > > I have a 20K line script in which I encounter an
2016 Nov 10
2
Memory leak with tons of closed connections
Dear All, I'm developing an R application running inside of a Java daemon on multiple threads, and interacting with the parent daemon via stdin and stdout. Everything works perfectly fine except for having some memory leaks somewhere. Simplified version of the R app: while (TRUE) { con <- file('stdin', open = 'r', blocking = TRUE) line <- scan(con,
2018 Feb 22
2
Problem with geterrmessage()
Luke Thanks ? I revised the code to: ERRORMESSAGE <- try(source(USERSCRIPTFILE, local=T), silent=T) print(ERRORMESSAGE) now returns: $value [1] 0 $visible [1] FALSE Not clear what to make of that. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com > On Feb 22, 2018, at 12:45 PM, luke-tierney at
2018 Feb 22
2
Problem with geterrmessage()
R 3.4.3 OS X Colleagues I have a 20K line script in which I encounter an unexpected problem. If the script detects presence of a particular file USERCODE.txt, it executes: source(?USERCODE.txt?) If that file is not present, the script executes without a problem. There might be syntax errors in USERCODE.txt; therefore, the code above is embedded in a try command:
2016 Nov 13
1
Memory leak with tons of closed connections
Using dup() before fdopen() (and calling fclose() on the connection when it is closed) indeed fixes the memory leak. FYI, Gabor Index: src/main/connections.c =================================================================== --- src/main/connections.c (revision 71653) +++ src/main/connections.c (working copy) @@ -576,7 +576,7 @@ fp = R_fopen(name, con->mode); } else { /* use
2016 May 04
4
Is it possible to retrieve the last error? (not error *message*)
Hi, at the R prompt, is it possible to retrieve the last error (as in condition object of class "error")? I'm not asking for geterrmessage(), which only returns the error message (as a character string). I'm basically looking for a .Last.error or .Last.condition, analogously to .Last.value for values, which can be used when it is "too late" (not possible) to go back
2016 Feb 29
2
Milestone: 8000 packages on CRAN
Another 1000 packages were added to CRAN, which took less than 7 months. Today (February 29, 2017), the Comprehensive R Archive Network (CRAN) [1] reports: ?Currently, the CRAN package repository features 8002 available packages.? The rate with which new packages are added to CRAN is increasing. In 2014-2015 we had 1000 packages added to CRAN in 355 days (2.8 per day), the following 1000
2019 Jan 07
2
Runnable R packages
On Mon, 7 Jan 2019 at 22:09, Gergely Dar?czi <daroczig at rapporter.net> wrote: > > Dear David, sharing some related (subjective) thoughts below. > > You can provide your app as a Docker image, so that the end-user > simply calls a "docker pull" and then "docker run" -- that can be done > from a user-friendly script as well. > Of course, this requires
2008 Jun 19
1
Appending diagnostic information to all lines sent to stdout and stderr
Dear All I'm logging the stdout and stderr of an R program into two separate files (stderr.txt and stdout.txt) using sink() I would like to append extra information such as "date", "memory usage" etc to every line of output that goes to stdout or stderr. For example > cat("hello \n") should give output that looks something like: "hello --- Thu Jun 19
2004 Mar 11
2
No traceback available when using try(...)
Hello, 1. The Situation : ------------------------ The stack traceback is not available when error ouccured in a try(....) -- test.R -------------------------------- f<-function(a){ return ( log(a) ) } try(f("A")) traceback() ------------------------------------------- I get the following message : > try(f("A")) Error in log(x) : Non-numeric argument to mathematical