similar to: Checking for a proper "stop" statement...

Displaying 20 results from an estimated 900 matches similar to: "Checking for a proper "stop" statement..."

2007 Jun 15
2
model.frame: how does one use it?
Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart. In short, the issue has to do with how rpart evaluates a formula and supporting arguments, in particular 'weights'. A simple contrived example is ----------------------------------------------------------------------------- library(rpart) ## using data from help(rpart), set up simple example myformula <-
2020 Jul 17
3
[FileCheck] RFC: Add support for line anchors.
Hello, I was wondering about extending FileCheck to enable creating line anchors. These are numeric variables that hold the value of the line number that where they were defined. The motivation for this comes from test cases using clang-based diagnostics which often include notes attached to source locations in different parts of the file. In order to test for the correct location of the note,
2020 Jul 17
2
[cfe-dev] [FileCheck] RFC: Add support for line anchors.
Hi Joel, That sounds like a very nice idea and definitely a direction I could get behind. However I feel that outside the use case I suggested, this functionality would only be used to compress CHECK lines that contain repeated text, not saying its a bad or good thing though. WDYT? ~Nathan On Fri, 2020-07-17 at 14:52 -0400, Joel E. Denny via cfe-dev wrote: > Hi Nathan, > > On Fri, Jul
2005 Aug 25
3
Converting characters to numbers in data frames
I'm sure I'm missing something obvious here, but I can't find the solution (including in the FAQ etc.). I have a vector of names of variables like this: NRes.x.y. where x and y are numbers. I want to extract these numbers as numbers to use elsewhere. I can extract the numbers as a list of characters using strsplit(), and convert that to a data frame, e.g.:
2004 Jun 22
2
function not in load table
Hi, I apologize for this often/old question. I found some hints but couldn't solve the problem so far. I have C functions (incl. the header files) as well as the R wrapper functions which I want to use for faster calculations. These functions are included in a R package. The installation process seems to be ok (no errors). I also can load the package without errors. But when I call the
2010 May 29
3
simpleError in storage.mode(y)
bonjour en travaillant avec un logiciel Multiple source methode, j'ai eu ce message d'erreur : simpleError in storage.mode(y) - "double": invalid to change the storage mode of a factor en recherchant sur le net , c'est un message universel svp, que signifiera ce message ? merci pour votre int?r?t anzid -- View this message in context:
2006 May 05
2
How to access results of survival analysis
Hi List, A friend of mine recently asked the same question as Heinz T?chler. Since I've already written the code I'd like to share with the list. # x is an object returned by "survfit"; # "smed" returns a matrix of 5 columns of # n, events, median, 0.95LCL, 0.95UCL. # The matrix returned has rownames as the # group labels (eg., treatment arms) if any. smed <-
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
2017 Dec 01
3
tryCatch in on.exit()
The following example involves a function whose on.exit() expression both generates an error and catches the error. The body of the function also generates an error. When calling the function wrapped in a tryCatch, should that tryCatch's error function be given the error from the body of the function, since the one from the on.exit has already been dealt with? Currently the outer tryCatch
2005 May 10
1
wish: print.condition and html (PR#7848)
Full_Name: Tom Short Version: 2.1.0 OS: Win2000 Submission from: (NULL) (68.236.159.160) print.condition prints out error messages enclosed in angle brackets as in: > simpleError("Sigh, yet another error...") <simpleError: Sigh, yet another error...> If R is used to generate HTML output (R2HTML or Rpad), then the error messages get hidden because browsers will skip right
2017 Nov 01
2
R-3.4.2: make check stops at line 698 of tests/reg-tests-1d.R
Dear Duncan, Many thanks! Am Mi, 1. Nov 2017, um 16:17, schrieb Duncan Murdoch: > On 01/11/2017 8:11 AM, Albrecht Kauffmann wrote: > > Hi all, > > > > after compiling R-3.4.2 on opensuse leap 42.3, make check failed. Until > > R-3.4.1 I never had a problem with these tests. No, the programm stops > > at the following line of tests/reg-tests-1d.R: > > >
2003 Nov 08
1
signalCondition
Does signalCondition() only work within try-catch blocks? I expected: testSignal <- function() { error <- simpleError("An error!") signalCondition(error) } to do the same thing as testStop <- function() { error <- simpleError("An error!") stop(error) } but testSignal returns NULL without throwing an error. Have I misunderstood something?
2017 Nov 01
2
R-3.4.2: make check stops at line 698 of tests/reg-tests-1d.R
Hi all, after compiling R-3.4.2 on opensuse leap 42.3, make check failed. Until R-3.4.1 I never had a problem with these tests. No, the programm stops at the following line of tests/reg-tests-1d.R: > ## available.packages() (not) caching in case of errors > tools::assertWarning(ap1 <- available.packages(repos = "http://foo.bar")) > tools::assertWarning(ap2 <-
2009 Jan 24
1
fonction PLATEAU???
Hello, I am working on extracting data from sound recording (fee bee song of the black-capped chickadee). I obtained a two column matrix with x=time(s) and y=frequency(khz). The part of the recording that is interesting me is when the frequency is stable. Does somebody ever used a fonction that extract only constant data among a huge list of data (sample= 180000)? Thanks Thibault Grava
2023 Nov 20
1
Calculating volume under polygons
Dear all; I am trying to calculate volume under each polygon of a shapefile according to a DEM. when I run the code, it gives me an error as follows. " Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'addAttrToGeom': sp supports Z dimension only for POINT and MULTIPOINT. use `st_zm(...)` to coerce to XY dimensions
2019 Mar 05
2
stopifnot
Another possible shortcut definition: assert <- function(exprs) do.call("stopifnot", list(exprs = substitute(exprs), local = parent.frame())) After thinking again, I propose to use ??? ? ? stop(simpleError(msg, call = if(p <- sys.parent()) sys.call(p))) - It seems that the call is the call of the frame where stopifnot(...) is evaluated. Because that is the correct context, I
2019 Mar 02
1
stopifnot
A private reply by Martin made me realize that I was wrong about stopifnot(exprs=TRUE) . It actually works fine. I apologize. What I tried and was failed was stopifnot(exprs=T) . Error in exprs[[1]] : object of type 'symbol' is not subsettable The shortcut assert <- function(exprs) stopifnot(exprs = exprs) mentioned in "Warning" section of the documentation similarly fails
2017 Nov 01
0
R-3.4.2: make check stops at line 698 of tests/reg-tests-1d.R
On 01/11/2017 8:11 AM, Albrecht Kauffmann wrote: > Hi all, > > after compiling R-3.4.2 on opensuse leap 42.3, make check failed. Until > R-3.4.1 I never had a problem with these tests. No, the programm stops > at the following line of tests/reg-tests-1d.R: > >> ## available.packages() (not) caching in case of errors >> tools::assertWarning(ap1 <-
2009 Mar 19
1
subtract values
Dear R-help I am using R version 2.6.2. I am trying to subtract specific values from a larger data frame. I feel this should be straightforward, but I am struggling. I have a dataframe "Bk" as follows: DateTime cumPrecip 01/01/2008 00:00 348 01/01/2008 01:00 348 01/01/2008 02:00 348 01/01/2008 03:00 347 01/01/2008 04:00 348 01/01/2008 05:00 348 01/01/2008 06:00 349
2017 Nov 01
0
R-3.4.2: make check stops at line 698 of tests/reg-tests-1d.R
On 01/11/2017 12:02 PM, Albrecht Kauffmann wrote: > Dear Duncan, > > Many thanks! > > Am Mi, 1. Nov 2017, um 16:17, schrieb Duncan Murdoch: >> On 01/11/2017 8:11 AM, Albrecht Kauffmann wrote: >>> Hi all, >>> >>> after compiling R-3.4.2 on opensuse leap 42.3, make check failed. Until >>> R-3.4.1 I never had a problem with these tests. No,