Displaying 20 results from an estimated 200 matches similar to: "Error in if (!length(fname) || !any(fname == zname)) { :"
2011 Apr 12
2
Model formula for ols function (rms package)
Dear R help,
I'm having some trouble with model formulas for the ols function in
the rms package. I want to have two variables represented as
restricted cubic splines, and also include an interaction as a product
of linear terms, but I get an error message.
library(rms)
d <- data.frame(x1 = rnorm(50), x2 = rnorm(50), y = rnorm(50))
ols(y ~ rcs(x1,3) + rcs(x2,3) + x1*x2, data=d)
Error in
2009 Jun 02
1
help on understanding a code
Dear R user,
I am trying to understand this following code. Basically it's using a
permutation method to calculate p value. But I would like to know exactly
how the permutation works.
#calculates null statistics
tt0 <- 0
set.seed(123)
B <- 100
for(i in 1:B) {
v <- sample(y)
tt0 <- c(tt0,ttest(dat,v)$tt)
}
tt0 <- tt0[-1]
#form p-values
att <- abs(tt)
att0 <- abs(tt0)
v
2001 Feb 10
1
match.call() and do.call()
hi all -
i have a function that needs to call glm() with a weights argument that
includes a variable whose name comes from the caller. so instead of:
fit <- glm(formula, poisson(), data, weights = 1-z, ...),
i do something like this:
fit <- do.call("glm", list(formula=formula, family=poisson(),
data=data, weights = call("-", 1, as.name(zname)), ...))
2009 May 31
2
convert the contents of a date.frame to a matrix
Dear R user,
I am trying to convert the contents of a date.frame to a matrix. Since there
are negative values in the date.frame, when I use data.matrix(x,
rownames.force = NA), the resulting matrix is not the same as the original
one. Basically I think R treats the numbers in the date.frame as character
and converts it to corresponding numerics.
Any idea on this issue?
Many Thanks,
Hongyuan
2005 Feb 12
4
Is is possible to do "shorewall reject 1.1.1.1 tcp 25"
Hello,
Is is possible to do "shorewall reject 1.1.1.1 tcp 25" ?
So I can dynamically blacklist offensive smtp senders, but only have
shorewall reject certain types (smtp) traffic from them?
Thanks,
Alex Martin
http://www.rettc.com
2007 Mar 14
2
ols Error : missing value where TRUE/FALSE needed
I have installed Hmisc and Design. When I use ols, I get the
following error message:
Error in if (!length(fname) || !any(fname == zname)) { :
missing value where TRUE/FALSE needed
The model that I am running is:
> ecools <- ols(eco$exp ~ eco$age + eco$own + eco$inc + inc2, x=TRUE)
I have tried several other combinations of arguments that take TRUE/
FALSE values, but no luck.
2006 Feb 02
1
error message in cox regression cph()
Hi,
I have been trying to get the cph() function of the Design package to work but get an error message I don't understand:
Error in if (!length(fname) || !any(fname == zname)) { :
missing value where TRUE/FALSE needed
I have tried the same for a dummy dataset I made, and than it seems to work fine. However, it doesn't do it for my own data. Does anyone have a clue as to what
2009 Sep 04
2
lrm in Design package--missing value where TRUE/FALSE needed
Hi,
A error message arose while I was trying to fit a ordinal model with lrm() I am using R 2.8 with Design package.
Here is a small set of mydata:
RC RS Sex CovA CovB CovC CovD CovE
2 1 0 1 1 0 -0.005575280 2
2 1 0 1 0 1 -0.001959580 2
3 0 0 0 1 0 -0.004725880 2
0 0 0 1 0 0 -0.005504850 2
2 1 1 0 0 0 -0.003880170 1
2 1 0 0 1 0 -0.006074230 2
2 1 0 0 1 1 -0.003963920 2
2 1 0 0 1 0
2009 Jun 25
1
interaction terms formula error
Hi,
I'm trying to fit a binary logistic regression model, and would like to consider certain characteristics B and C only for people with variable A=1 and not for those with variable A=0, so I'm trying to do the following:
model<- lrm(formula= y ~ A: (B+C) + D + E +...)
I've had no problem with adding interaction terms using " * ", but every time I try to use
2010 Jun 07
1
ols function in rms package
Hello,
I have a couple of questions about the ols function in Frank Harrell's rms
package.
Is there any way to specify variables by their column number in the data
frame rather than by the variable name?
For example,
library(rms)
x1 <- rnorm(100, 0, 1)
x2 <- rnorm(100, 0, 1)
x3 <- rnorm(100, 0, 1)
y <- x2 + x3 + rnorm(100, 0, 5)
d <- data.frame(x1, x2, x3, y)
rm(x1, x2, x3,
2008 Apr 01
1
lrm -interaction without main effect-error message
Dear all,
this might be not only an R-question but also a statistical.
When I do a logistic regression analysis (species distribution modeling)
with function lrm (Design package) I get the follwoing error message:
> tadl1<-lrm(triad~fd+dista+fd2+dista2+fd:dista+dista:geo2, x=T, y=T)
Error in if (!length(fname) || !any(fname == zname)) { :
missing value where TRUE/FALSE needed
The
2009 Nov 05
1
help with ols and contrast functions in Design library
Dear All,
I'm trying to use the ols function in the Design library (version
2.1.1) of R to estimate parameters of a linear model, and then use the
contrast function in the same library to test various contrasts.
As a simple example, suppose I have three factors: feature (3
levels), group (2 levels), and patient (3 levels). Patient is coded
as a non-unique identifier and is
2012 Mar 05
1
Error in file(fname, "r") : invalid 'description' argument when running maptools' readAsciiGrid on a dataframe
Hi,
I'm trying to calculate a sum of differences between two ascii grids.
I have the file names of the two grid files in a data.frame along with
other data. I'm then trying to add a new column to the data.frame with
the result of that calculation.
eg.
library(maptools)
difcount <- function(surfA, surfB) {
A <- readAsciiGrid(surfA, colname="a")
B <-
2010 Oct 29
2
how to debug (mtrace) a function defined inside a function?
Hi, everyone. I am using a fair amount of closures in my code. Problem i am
experiencing is i cannot figure out how to mtrace functions defined within a
function. There must be some way to name such function for mtrace to see it
and let me step into it. For example, say i have code
mymodel<-function(){
data<-numeric(0)
build<-function(){
data<<-1
}
m<-list()
2007 Jan 02
4
Am I missing something about debugging?
I would like to be able to trace execution into calls below the current
function, or to follow execution as calls return. This is roughly the
distinction between "step" and "next" in many debuggers.
I would also like to be able to switch to a location further up the call
stack than the location at which I enter the debugger, to see the
context of the current operations.
Are
2011 Apr 07
2
How to debug reference classes?
How do you debug methods of a reference class? I've been using mtrace, which
is excellent, but i cannot figure out how to mtrace a reference class
method. Maybe there is some other way to debug these, for example with
ordinary trace? for now i am only able to use options(error=recover), which
is not giving me idea where exactly in the code i am once i am stopped on an
error.
--
View this
2006 Oct 18
1
strange error in mtrace
Dear useRs,
I am experiencing very strange error with Mark Bravington's package "debug".
I haven't seen them before.
Here is the sample session
> library(debug)
Loading required package: mvbutils
MVBUTILS: no "tasks" vector found in ROOT
Loading required package: tcltk
Loading Tcl/Tk interface ... done
> x<-function() return(1)
> mtrace(x)
> x()
Error
2011 Dec 22
1
mtrace function
I use windows xp. When trying to use the function mtrace from package debug
the window that should open with the function to be debugged do not show
any text at all. It shows only a part of my desktop. Does anyone know why.
Is there any imcompatibility between windows xp and debug package.
Thanks in advance.
Enio Jelihovschi
[[alternative HTML version deleted]]
2007 Apr 04
1
Need mtrace (malloc debugging) help
Hi all,
I am using "mtrace" malloc debugging utility to trace memory leaks in my
application.
I followed following steps:
1. Added mtrace() function in the beginning of my main function.
2. exported the MALLOC_TRACE environment variable.
$ export MALLOC_TRACE=memory.log
3. Run the program
4. trace the program for memory leaks.
$ mtrace <myprogram> $MALLOC_TRACE
But In
2002 Nov 05
2
2.5.6 release
On Tue, Nov 05, 2002 at 08:37:00AM -0800, Martin Pool wrote:
> On 10 Oct 2002, "Green, Paul" <Paul.Green@stratus.com> wrote:
> > No new CVS messages have appeared on the rsync-cvs archives since August
> > 30th. This seems rather odd-- perhaps a daemon stopped working? If there
> > has truly been no activity since that date, I apologize for
> >