similar to: recover() (PR#8546)

Displaying 20 results from an estimated 50000 matches similar to: "recover() (PR#8546)"

2009 Oct 27
1
recover and "called from" information
Hello, When using recover, the called from information is always "eval(expr, envir, enclos)", which is not particularly useful. > f <- function( ){ g <- function(){ stop( "ouch") }; g() } > options( error = recover ) > f() Error in g() : ouch Enter a frame number, or 0 to exit 1: f() 2: g() Selection: 1 Called from: eval(expr, envir, enclos) I'm
2010 Nov 11
3
Evaluation puzzle
The survexp function can fail when called from another function. The "why" of this has me baffled, however. Here is a simple test case, using a very stripped down version of survexp: survexp.test <- function(formula, data, weights, subset, na.action, rmap, times, cohort=TRUE, conditional=FALSE, ratetable=survexp.us, scale=1, npoints, se.fit,
2004 Aug 09
1
error when calling debugger()
Hi, I am getting an error message when I am trying to run the debugger() on the last.dump. The debugger() stops after I make a selection. Could someone please suggest what it might mean? The R log is included below. This is R-1.8.1 on RH 7.3. Thanks, Vadim > load("last.dump.rda") > debugger(last.dump) Message: Error in split(x, f) : Group length is 0 but data length > 0
2003 Apr 02
2
pacf.mts
I am getting the following: *** Weave Errors *** Error in driver$runcode(drobj, chunk, chunkopts) : Error in eval(expr, envir, enclos) : couldn't find function "pacf.mts" *** Source Errors *** Error in eval(expr, envir, enclos) : couldn't find function "pacf.mts" make[1]: *** [checkVignettes] Error 1 I don't really understand the new namespace mechanism,
2013 Mar 19
1
source, sys.source and error line numbers
Hi, is there a way to retrieve the line number of where en error occurred when sourcing a file in a tryCatch statement? Is it stored somewhere accessible? It is not found in the error object. Consider the following code/output and note the difference in the traceback between source (has line number) and sys.source (has no line number). Thank you, Renaud ######## # code ######## codefile <-
2006 Nov 21
1
strange R GUI crash
Hi all, I know I shouldn't really expect the following to work, but it provokes a crash of the GUI on my computer (Win xp professional). --- >sessionInfo() Version 2.3.1 (2006-06-01) i386-pc-mingw32 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base"
2015 Jul 15
2
bquote/evalq behavior changed in R-3.2.1
On Jul 15, 2015, at 12:51 PM, William Dunlap wrote: > I think rapply() was changed to act like lapply() in this respect. > When I looked at the source of the difference, it was that typeof() returned 'language' in 3.2.1, while it returned 'list' in the earlier version of R. The first check in rapply's code in both version was: if (typeof(object) != "list")
2016 Apr 20
1
locked environments
Shouldn't the following 4 ways to alter an object in a locked environment either all work or all fail? (All working would be nice, I think.) E <- new.env() assign("var", c(1,2,3,4), envir=E) lockEnvironment(E, bindings=FALSE) E$var[1] <- 101 ; E$var #[1] 101 2 3 local(var[2] <- 102, envir=E) #Error in eval(expr, envir, enclos) : # cannot add
2005 Dec 21
2
Newbie - Summarize function
Dear R Users, I have searched through the archives but I am still struggling to find a way to process the below dataset. I have a dataset that has stratum and plot identifier. Within each plot there is variable (Top) stating the number of measurments that should be used to to calculate the mean to the largest "top" elements within one of the vectors (X). I would like to process
2012 Sep 26
1
how to know where you've been sourced from
Hello All, I need a script to perform different actions depending on the file from which it was source()'d. Thus, my script needs a way to figure out from whence it was sourced. There seems to be some relevant information in sys.calls() (see below). However, I need to get at the name of the file that directly source the file in question. That is, just one level above. For example, in the
2015 Jul 15
2
bquote/evalq behavior changed in R-3.2.1
David, If you are referring to the solution that would be: rapply(list(test), eval, envir = fenv) I thought I explained in the question that the above code does not work. It does not throw an error, but the behavior is no different (at least in the output or result). Using the above code still results in the x object not being stored in fenv on 3.1.2. Dayne On Wed, Jul 15, 2015 at 4:40 PM,
2008 Aug 13
1
Arguments to lm() within a function - object not found
Hi all, I'm having some difficulty passing arguments into lm() from within a function, and I was hoping someone wiser in the ways of R could tell me what I'm doing wrong. I have the following: lmwrap <- function(...) { wts <- somefunction() print(wts) # This works, wts has the values I expect fit <- lm(weights=wts,...) return(fit) } If I call my function lmwrap, I get
2018 Oct 05
2
Dots are not fixed by make.names()
Hi It seems that names of the form "..#" and "..." are not fixed by make.names(), even though they are reserved words. The documentation reads: > [...] Names such as ".2way" are not valid, and neither are the reserved words. > Reserved words in R: [...] ... and ..1, ..2 etc, which are used to refer to arguments passed down from a calling function, see
2007 Nov 12
1
(no subject)
Hello members of the mailinglist! I am running R 2.6.0 GUI 1.21 (4815) (4815) on a PPC with Mac OS X 10.4. I just tried to use the R commander. I followed these instructions: 4) Start R (e.g. double-click the R icon in /Applications). 5) Start X11 (e.g. click the X11 button on the R Console or double- click the X11 icon in /Applications/Utilities). 6) Close the X11 terminal (optional). 7) Type
2012 May 15
1
Error in eval(expr, envir, enclos) : object 'Rayos' not found???
Hi R-listers, I am trying to make a trellis boxplot with the HSuccess (y-axis) in each Rayos (beach sections) (x-axis), for each Aeventexhumed (A, B, C) - nesting event. I am not able to do so and keep receiving: Error in eval(expr, envir, enclos) : object 'Rayos' not found Please advise, Jean require(plyr) resp <- read.csv("ABC Arribada R File Dec 12 Jean
2009 May 04
1
ellipsis problem
Hi, I'm confused about the use of ellipsis in function arguments. I'm trying to write a wrapper for plot to automate the combination of plot() and points() calls for a data.frame. Some arguments seem to get passed through to the inner plot, while others cause an error: Error in eval(expr, envir, enclos) : ..1 used in an incorrect context, no ... to look in As a minimal example: tmp
2010 Sep 21
3
Error in eval(expr, envir, enclos)
I am absolutely new to R and I am aware of only a few basic command lines. I was running a robust regression in R, using the following command line library (MASS) rfdmodel1 <- rlm (TotalEmployment_2004 ~ MISSISSIPPI + LOUISIANA + TotalEmployment_2000 + PCWhitePop_2004 + UnemploymentRate_2004 + PCUrbanPop2000 + PCPeopleWithACollegeDegree_2000 + PCPopulation.of.or.over.65.years.of.age_2004)
2017 May 11
1
R-3.3.3/R-3.4.0 change in sys.call(sys.parent())
Here is a case where the current scheme fails: > with(datasets::mtcars, xyplot(mpg~wt|gear)$call) xyplot(substitute(expr), data, enclos = parent.frame()) Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, May 11, 2017 at 1:09 AM, Deepayan Sarkar <deepayan.sarkar at gmail.com> wrote: > On Wed, May 10, 2017 at 2:36 AM, William Dunlap via R-devel > <r-devel at
2017 May 09
3
R-3.3.3/R-3.4.0 change in sys.call(sys.parent())
Some formula methods for S3 generic functions use the idiom returnValue$call <- sys.call(sys.parent()) to show how to recreate the returned object or to use as a label on a plot. It is often followed by returnValue$call[[1]] <- quote(myName) E.g., I see it in packages "latticeExtra" and "leaps", and I suspect it used in "lattice" as well. This idiom
2008 May 30
2
scoping problem when calling lm(precomputed formula, weights) from function (PR#11540)
I've run into a scoping problem in R. I'm calling a function that * creates a formula * calculates a weight vector * calls lm with that formula and weights This fails. Here's a simplified reproduce example: # f works, g doesn't, h is a workaround rm(w) data <- data.frame(y=runif(20), x=runif(20), z=runif(20)) f <- function(k){ w <- data$z^k coef(lm(y~x, data