Displaying 20 results from an estimated 10000 matches similar to: "expand.model.frame() fails when subset is specified (PR# 979)"
2001 Jun 14
1
expand.model.frame() fails when subset is specified (PR#979)
Full_Name: Gregory R. Warnes
Version: 1.2.0, 1.2.3
OS: SunOS gsun124 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-5_10
Submission from: (NULL) (12.18.36.49)
When using expand.model.frame on a model that specifies a subset selection,
an error is generated on the variable used for the subset selection.
Example:
> data <- data.frame(x=1:10,y=1:10,z=1:10,m=1:10)
> model <- lm( y ~
2002 Nov 02
1
problem with expand.model.frame
Dear R list members,
I'm encountering a problem with expand.model.frame(): Suppose that I define
the following simple function (meant
just to illustrate the problem):
> fun <- function(model){
+ expand.model.frame(model, all.vars(formula(model)))
+ }
>
and I have the following model, created with an explicit data argument:
> mod
Call:
2002 Mar 29
1
expand.model.frame fails when call creating model has no data (PR#1423)
I've encounted a problem using expand.model.frame. To illustrate, consider
the function
> test <- function(model){
+ expand.model.frame(model, "income")
+ }
>
The data frame Prestige (from the car library) has several variables,
including prestige, income and education. I've attached this data frame and
fit the following model
>
2002 Mar 29
0
further on use of expand.model.frame
Dear R-help list members,
Yesterday, I described a problem that I encountered with the use of
expand.model.frame when the model object passed to this function was
created without an explicit data argument in the call.
I've had no responses, but I've been able to work around the problem by
making a change to expand.model.frame, replacing the line
rval <-
2011 Aug 17
0
vglm regression with weibull distribution
Dear all,
I'm facing a problem in estimation of glm model with weibull distribution. I run this :
eqn0<-formula(fdh~cup1+cup2+cup3+cup4+fin1+vd1+cm2+cm4+milieu+cpro1+cpro2+cpro3a+cpro3b+schef+log(y))
regWeib0<-vglm(eqn0,family=weibull,subset(br, fdh<1))
I have en estimation but there is a message saying that regularity conditions are violated :
Message d'avis :
In eval(expr,
2008 Mar 30
1
Second & subsequent calls to function fails. Please help debug.
Dear R-helpers,
I'm running Sweave() on a file. First run:
> Sweave('20080331.Rnw')
Writing to file 20080331.tex
Processing code chunks ...
1 : term hide (label=setup)
2 : echo term verbatim (label=oatvar)
3 : echo term verbatim (label=oatvar1)
4 : echo term verbatim (label=oat2wt)
5 : echo term verbatim (label=oat2wt)
6 : echo term verbatim (label=lm)
7 : echo term
2005 Jan 01
1
Use of expand.model.frame()
Dear list members,
I've encountered a problem using expand.model.frame() with a model specified
without an explicit data argument. To illustrate (R 2.0.1 under Windows XP):
> x <- rnorm(10)
> y <- x + rnorm(10)
> mod <- lm(y ~ x)
> z <- 1:10
> expand.model.frame(mod, "z")
Error in eval(expr, envir, enclos) : Object "y"
2008 Oct 14
1
library MICE warning message
Hello.
I have run the command
imp<-mice(mydata, im=c("","pmm","logreg","logreg"),m=5)
for a variable with no missing data, a numeric one and two variables with binary data.
I got the following message:
There were 37 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In any(predictorMatrix[j, ]) ... : coercing argument of
2004 Sep 30
1
expand.model.frame gives "object not found"
Hello,
I am a (relatively) experienced programmer, but new to R.
I have a problem using R 1.9.1. I have fit some data using glm(), from
within a function:
formula = as.formula(paste(depvarname, "~", rhs), env=globalenv())
return (glm(formula, family=binomial(link=logit)))
I have now come back to the formula and want to add some more
variables to it. So I do:
2007 Feb 10
1
how to eval subset?
Hi,
I have problems with subset when calling a function from inside a function
from inside a function. Here is a small example to be called as 'f1()'.
'eval()' in f3 fails with error message
Error in eval(expr, envir, enclos) : object "subs" not found
Is it possible to supplement subset to data, to be calculated in a
different environment than the data itself?
Thanks
2015 Jul 15
0
bquote/evalq behavior changed in R-3.2.1
I think rapply() was changed to act like lapply() in this respect.
In R-3.1.3 we got
rapply(list(quote(1+myNumber)), evalq, envir=list2env(list(myNumber=17)))
#[1] 18
rapply(list(quote(1+myNumber)), eval, envir=list2env(list(myNumber=17)))
#Error in (function (expr, envir = parent.frame(), enclos = if
(is.list(envir) || :
object 'myNumber' not found
lapply(list(quote(1+myNumber)),
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()),
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
2006 Feb 12
1
lme, nlsList, nlsList.selfStart
Dear listers,
I am trying to fit a model using nlsList() using alternately a SSfol()
selfstart function or its developped equivalent formulae.
This preliminary trial works well
mydata<-groupedData(Conc~Tps|Organ,data=mydata)
mymod1<-nls(Conc~SSfol(Dose,Tps,lKe,lKa,lCl),data=mydata)
as well as a developped form:
mymod2<-nls(Conc~Dose * exp(lKe+lKa-lCl) *
2015 Jul 15
0
bquote/evalq behavior changed in R-3.2.1
Another aspect of the change is (using TERR's RinR package):
> options(REvaluators=list(makeREvaluator("R-3.1.3"),
makeREvaluator("R-3.2.0")))
> RCompare(rapply(list(quote(function(x)x),list(quote(pi),quote(7-4))),
function(arg)typeof(arg)))
R version 3.1.3 (2015-03-09) R version 3.2.0 (2015-04-16)
[1,] [1]
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
2015 Jul 15
0
bquote/evalq behavior changed in R-3.2.1
Bill,
Is your conclusion to just update the code and enforce using the most
recent version of R?
Dayne
On Wed, Jul 15, 2015 at 4:44 PM, Dayne Filer <dayne.filer at gmail.com> wrote:
> 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.
2004 Jun 16
2
subset and lme
I'm puzzled by the following problem, which appears when
attempting to run an analysis on part of a dataset:
If I try:
csubset <- dat$Diagnosis==0
cont <- lme(fixed=cform,
random = ~1|StudyName,
data=dat,subset=csubset,na.action=na.omit)
Then I get:
Error in eval(expr, envir, enclos) : Object "csubset" not found
But if I do
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