[R] Error in model.frame
ross at biostat.ucsf.edu
Sat Aug 16 01:03:26 CEST 2003
I am getting an error that I don't understand, and wonder if anyone
could explain what's going on. I call a function defined thus:
method="exact" # only option for now
At the eval on the last line, I get
Error in model.frame(formula, rownames, variables, varnames, extras,
variable lengths differ
This is puzzling for two reasons. First, I don't understand where the
arguments given in the error message are coming from. They are not in
my function definition or call, and they do not seem to be the arguments
to model.frame either.
Second, I don't know why it's not working! This is modified from clogit
in survival, and that works fine. I've added two arguments, extra.data
(which is just a column of the data) and response.prob. The latter has
different dimensions (response.prob = c(1, 1), in fact), but nothing in
the description of model.frame suggests that should be a problem.
model.frame itself is a wrapper on a primitive, so I can't really debug
Running R 1.7.1-1 on Debian Gnu/Linux.
In case it matters, the code I'm running was produced by hacking the
survival package, running R CMD check, and then loading the package from
the test directory that created:
The clogit command seems to run fine.
One of the variables in the data.frame is name proband, which I notice
gets highlighted by ESS.
More information about the R-help