similar to: error when calling debugger()

Displaying 20 results from an estimated 20000 matches similar to: "error when calling debugger()"

2005 Mar 08
4
how modify object in parent.env
Hi, Is it possible to modify an object in the parent.env (as opposed to re-bind)? Here is what I tried: > x = 1:3 # try to modify the first element of x from within a new environment > local(get("x", parent.env(environment()))[1] <- NA) Error in eval(expr, envir, enclos) : Target of assignment expands to non-language object # On the other hand retrieval works just fine >
2004 Sep 27
2
passing formula arg to mgcv::gam
Hi, I have a function, callGam, that fits a gam model to a subset of a dataframe. The argument to callGam is a formula, the subset is determined inside the function itself. My na??ve approach generates and error, see below. I guess this is because 'idx' is loocked up in the environment of 'formula', but I am too ignorant about environments to be able to tell for sure. Could
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 Feb 01
1
recover() (PR#8546)
After using options(error=recover), it takes a long time (too long) to get back to the prompt. Look at: Browse[1]> recover() Enter a frame number, or 0 to exit 1: window(test, start = c(15, 1), end = c(17, 1), extend = TRUE) 2: window.ts(test, start = c(15, 1), end = c(17, 1), extend = TRUE) 3: as.ts(window.default(x, ...)) 4: window.default(x, ...) 5: function () 6: eval(quote(browser()),
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,
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
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
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
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
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
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
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
2011 Mar 23
2
) Error in eval(expr, envir, enclos) : object '' not found
> datafilename="E:/my documents/r/sex/bysex1.csv" > data.sex=read.table(datafilename,header=T) > data.sex y.sex.age.region.c.n 1 1980,F,A,N,-18.15,13.61 2 1980,F,A,N,-18.61,13.04 3 1980,F,A,N,-18.81,12.32 4 1990,F,A,N,-21.12,11.7 5 1990,F,A,N,-20.77,11.58 6 1990,F,A,N,-21.6,13.34 7 1990,F,A,N,-21.78,12.6 > model.anova<-aov(c~age*sex,data=data.sex)
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
2004 Jun 03
1
GAM question
I am trying to use R to do a weighted GAM with PA (presence/random) as the response variable (Y, which is a 0 or a 1) and ASPECT (values go from 0-3340), DEM (from 1500-3300), HLI (from 0-5566), PLAN (from -3 to 3), PROF (from -3 to 3), SLOPE (from 100-500) and TRI (from 0-51) as predictor variables (Xs). I need to weight each observation by its WO value (from 0.18 to 0.98). I have specified the