search for: enclo

Displaying 20 results from an estimated 160 matches for "enclo".

Did you mean: enclos
2008 Oct 14
1
library MICE warning message
...In any(predictorMatrix[j, ]) ... : coercing argument of type 'double' to logical 11: In any(predictorMatrix[, j]) ... : coercing argument of type 'double' to logical 12: In any(predictorMatrix[j, ]) ... : coercing argument of type 'double' to logical 13: In eval(expr, envir, enclos) ... : non-integer #successes in a binomial glm! 14: In eval(expr, envir, enclos) ... : non-integer #successes in a binomial glm! 15: In eval(expr, envir, enclos) ... : non-integer #successes in a binomial glm! 16: In eval(expr, envir, enclos) ... : non-integer #successes in a binomial glm! 17: In...
2011 Mar 23
2
) Error in eval(expr, envir, enclos) : object '' not found
...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) Error in eval(expr, envir, enclos) : object 'age' not found i just wanna do a anova test. but the error message is as above,,, what should i do to shoot this problem ? Should i define the age? -- View this message in context: http://r.789695.n4.nabble.com/Error-in-eval-expr-envir-enclos-object-not-fou...
2007 May 27
2
Question about "evalq"
The help page of eval says: The 'evalq' form is equivalent to 'eval(quote(expr), ...)'. But the following is not equivalent. Can anyone give me some explaination? Thanks very much. > f1 <- function(x,digits=5) lapply(x, f2) > f2 <- function(x) eval(quote(print(x+1,digits=digits)),list(x=x),parent.frame(2)) > f1(list(x1=1)) [1] 2 $x1 [1] 2 > > f1 <-
2005 Dec 21
2
Newbie - Summarize function
...the largest "top" elements within one of the vectors (X). I would like to process this summary statistic by groups. At this stage I have been trying to use the "summarize" function within the Hmisc library but I am getting the following error "Error in eval(expr, envir, enclos) : numeric 'envir' arg not of length one In addition: Warning message: no finite arguments to max; returning -Inf". Any suggetsions on how I can fix this would be greatly appreciated. Kind regards Andrew test <- read.table("test.csv", header=TRUE, sep=",")...
2008 Aug 13
1
Arguments to lm() within a function - object not found
...g 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 the the following error: > lmwrap(a~b) Error in eval(expr, envir, enclos) : object "wts" not found A traceback gives me the following: 8: eval(expr, envir, enclos) 7: eval(extras, data, env) 6: model.frame.default(formula = ..1, weights = wts, drop.unused.levels = TRUE) 5: model.frame(formula = ..1, weights = wts, drop.unused.levels = TRUE) 4: eval(expr, en...
2010 Dec 08
1
Error in eval.with.vis(expr, envir, enclos) : subscript out of bounds
...) This file runs through without any problems, so the program completes the loop one time. However, when the loop starts a second time and it comes time to call the file "estimation.R" again, program stops and prints the following error message: "Error in eval.with.vis(expr, envir, enclos) : subscript out of bounds" This happens every time I try to run the program. What could cause it? [[alternative HTML version deleted]]
2005 Aug 15
2
stepAIC invalid scope argument
...- aov( y ~ x2 + x3, data=df ) Running any of the following commands stepAIC( mid, scope=list(upper = ~x1 + x2 + x3 , lower = ~1) ) stepAIC( mid, scope=list(upper = hi , lower = lo) ) addterm( mid, ~ x1 + x2 + x3 ) addterm( lo, hi ) gives the same error message : Error in eval(expr, envir, enclos) : invalid second argument Here is a traceback of the first failed command : 14: eval(predvars, data, env) 13: model.frame.default(formula = y ~ x2 + x3 + x1, data = df, drop.unused.levels = TRUE) 12: model.frame(formula = y ~ x2 + x3 + x1, data = df, drop.unused.levels = TRUE) 11: eval(expr,...
2012 Sep 26
1
how to know where you've been sourced from
...uot;)",file="source_test.r") > cat("source(\"source_test.r\")",file="source_test_parent.r") > source("source_test_parent.r") [[1]] source("source_test_parent.r") [[2]] eval.with.vis(ei, envir) [[3]] eval.with.vis(expr, envir, enclos) [[4]] source("source_test.r") [[5]] eval.with.vis(ei, envir) [[6]] eval.with.vis(expr, envir, enclos) [[7]] source("test.r") [[8]] eval.with.vis(ei, envir) [[9]] eval.with.vis(expr, envir, enclos) [[10]] print(sys.calls())
2012 Dec 10
3
Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
...ot;no trust","trust": 2 1 1 1 1 2 1 2 1 2 ... #######Set up survey design des.1<-svydesign(~0, weights=~weight, data=mat1) #######model and response to svyglm mod1<-svyglm(trust ~ gender+edu+prov, design=des.1, family='binomial') Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm! ########Model Summary summary(mod1) Call: svyglm(formula = trust ~ gender + edu + prov, design = des.1, family = "binomial") Survey design: svydesign(~0, weights = ~weight, data = mat1) Coefficients: Estimate Std. E...
2012 Jan 16
2
Object not found using GAMs in MGCV Package
...ot; "Distance" "Width" "System" "Channel" "Profile" "Bathy" "Slope" "Salinity" X is longitude and Y is Latitude. I typed in the code below and received the reply "Error in eval(expr, envir, enclos) : object 'Atlantic' not found". > library(mgcv) This is mgcv 1.7-6. For overview type 'help("mgcv-package")'. > help("mgcv-package") starting httpd help server ... done > gam(Atlantic ~ s(depth, bs="sos", k=4) + s(distance, bs="sos...
2017 Apr 28
2
ggplot dentro de una función
...variable a pintar en el eje de las x. Se me ocurre ésta: grafico <- function(dt, varx) { ggplot(dt, aes(x = Date, y = varx)) + geom_point() ## un montón de código de configuración del gráfico, etc } grafico(datos, V1) Pero ggplot dice que no encuentra V1... Error in eval(expr, envir, enclos) : object 'V1' not found In addition: Warning message: In eval(expr, envir, enclos) : restarting interrupted promise evaluation Alguna sugerencia o nuevo enfoque? Muchas gracias Rubén [[alternative HTML version deleted]]
2008 Oct 18
3
Select only cases with negative values
Hello, I was wondering if there was a way to only select cases my from data frame that contained a negative value? > c<-c(1,2,3,4,5,6,7,8,9,10) > d<- c(-1,2,-3,-4,5,6,-7,8,-9,10) > f <- cbind(c,d) > dat <-data.frame(f) > dat.lm <-lm(c~d) If I wanted to only use the rows that had a negative value in column d for my regression, how could I make that selection?
2007 Feb 09
0
slice sampler
...=.0001){ sexpr <- substitute(expr) if (!(is.call(sexpr) && match("x", all.vars(sexpr), nomatch = 0))) stop("'expr' must be a function or an expression containing 'x'") expr <- sexpr y.log <- eval(expr, envir=list(x=x0),enclos = if(is.null(list(...)$env)) parent.frame() else list(...)$env)-rexp(1) k <- length(y.log) if(k!=length(x0)) stop("The dimension of y.log and x0 have to agree") U <- runif(k) L <- x0-w*U R <- L+w U <- runif(k) J <- floor(m*U) K &lt...
2005 Oct 26
1
Pb encountered with demos
...naries using the menu) - Lattice: > demo(lattice,package='lattice') demo(lattice) ---- ~~~~~~~ Type <Return> to start : > require(grid) [1] TRUE > old.prompt <- grid.prompt(TRUE) > old.settings <- trellis.par.get() Erreur dans eval.with.vis(expr, envir, enclos) : impossible de trouver la fonction "trellis.par.get" - Zelig > demo(poisson,package='Zelig') demo(poisson) ---- ~~~~~~~ Type <Return> to start : > data(sanction) > user.prompt() Erreur dans eval.with.vis(expr, envir, enclos) : impossible de t...
2004 Jul 15
5
formula
Hi, i 'dont understand how to take a general formula, view this: x<-1:5 y<-c(0,1,1.7,2,2.1.4) dummy<-data.frame(x=x,y=y) formula<-"y~A*log(x)/log(2)" formu<-as.formula(formula) fm<-lm(formu,data=dummy) Error in eval(expr, envir, enclos) : Object "A" not found but A is the parameter of fitting, why is this?Thanks Ruben
2011 Nov 27
2
Transforming a string into a command
I would like to make a string executable, e.g, s<- "ln(a+b)" a<-1 b<-2 ???? execute string s to obtain ln(a+b) ???? How can I make it? Ciao fron Rome Vittorio
2012 Nov 01
2
Problem with lm
...Mac machine with the same R version. The part of the code is giving problems: singleCosinor <- function(t, y, period=24) {   x1 <- cos(2 * pi * t / period)   x2 <- sin(2 * pi * t / period)   single <- lm (y ~ x1 + x2)   return(single) } The error: Error en eval(expr, envir, enclos) : objeto 'y' no encontrado Can it be in relation with scoping?. Thanks in advance. Eva [[alternative HTML version deleted]]
2008 Mar 09
1
Calling plot with a formula, from within a function, using ..., and xlim
...Here is an example: > plotw <- function(obj,...) { + plot(k~j, data=obj,...) + } > plotw2 <- function(obj,...) { + plot(obj$j,obj$k, ...) + } > df <- data.frame(j=1:3,k=1:3) > plotw(df, las=1, xaxs="i") > plotw(df, xlim=c(0,4)) Error in eval(expr, envir, enclos) : ..1 used in an incorrect context, no ... to look in > plotw2(df, las=1, xaxs="i") > plotw2(df, xlim=c(0,4)) I was guessing this might be related to some sort of argument matching, but I don't see why xaxs doesn't cause a problem in that case. So I am somewhat...
2012 Nov 16
10
about lm
...csv file entitled ven.csv located in C:\\, this file contains only two columns:"ve" and "su" I have written the following lines: data=read.csv("c:\\ven.csv",header=TRUE,sep=";"); lm(ve~ su) I have obtained the following message: Error in eval(expr, envir, enclos) : object 've' does not exist. What's the problem? thank you for your help in advance [[alternative HTML version deleted]]
2008 May 25
1
How to write a package based on nlme
Dear R Helpers, I try to write a small package that based on nlme however my code does not work. R always appears this message: Error in eval(expr, envir, enclos) : object "y" not found where y is the response variable. Please help me out! This is my code: require(nlme) AMPmixed<-function(y, x, S1=c("asymptotic","logistic"), random,data, S2=c("asymptotic","logistic"), start) { logist.logis...