Full_Name: Mark Bravington
Version: 2.0.1
OS: Windows XP
Submission from: (NULL) (140.79.22.104)
'getAnywhere' crashes when its argument starts with a period:
> getAnywhere( '.onLoad')
Error in exists(x, envir, mode, inherits) :
invalid first argument
One fix
Full_Name: Mark Bravington
Version: 2.0.1
OS: Windows XP
Submission from: (NULL) (140.79.22.104)
'sys.on.exit()' doesn't seem to be working, since R1.7.1 at least:
soe.test <- function() {
on.exit( cat( 'In exit code\n'))
str( sys.on.exit()) # should displa
t2, ~.-offset(x))$call
glm(formula = y ~ z + offset(x), data = df)
# the offset wasn't removed even though it should have been
> update( fit2, ~.-z)$call
glm(formula = y ~ 1, <<...>>
# now the offset has been removed even though it should have stayed!
Mark
***
) + z, data = df)
test> fit2u <- update( fit2, ~.)
test> fit2u$call
glm(formula = y ~ offset(log(x)) + z, data = df)
Curiously, the 'term.labels' attribute of 'terms(object)' now includes the second
offset, but not the first.
***
Mark Bra
7;t intentional!
NB still happens in 1.8.1 alpha
Mark
***
Mark Bravington
CSIRO (CMIS)
PO Box 1538
Castray Esplanade
Hobart
TAS 7001
phone (61) 3 6232 5118
fax (61) 3 6232 5012
[EMAIL PROTECTED]
--please do not edit the information below--
Version:
platform = i386-pc
ons:
.Tcl( .Tcl.args( listio, 'insert', 'end', letters[1:3]))
Mark
***
Mark Bravington
CSIRO (CMIS)
PO Box 1538
Castray Esplanade
Hobart
TAS 7001
phone (61) 3 6232 5118
fax (61) 3 6232 5012
[EMAIL PROTECTED]
# [EMAIL PROTECTED]
--pleas
ting "gen <-" & "cl <- " might want
to become:
gen <- paste(parts[1:(i - 1)], collapse = ".")
cl <- paste(parts[ i:length(parts)], collapse = ".")
Mark Bravington
CSIRO (CMIS)
PO Box 1538
Castray Esplanade
Hobart
TAS 7001
phone (61) 3 6232
andy, package:debug, mvb.session.info, package:mvbutils,
package:tcltk, Autoloads, package:base
***
Mark Bravington
CSIRO (CMIS)
PO Box 1538
Castray Esplanade
Hobart
TAS 7001
phone (61) 3 6232 5118
fax (61) 3 6232 5012
[EMAIL PROTECTED]
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
a?
Could it be implemented simply? (Presumably yes, by just mirroring the way R
searches for objects..?)
It seems to me as though there might be a logical gap hereabouts with
assignment. I've had a bit of a look in the new "A simple implementation of
name spaces for R", and it see
that context
according to the documentation (as well as common sense. Normally I am no
fan of slavish adherence to documentation, but in my own interests I'll make
an exception...). And yet there's an error message, not even a warning.
Prediction from the original data was just an example,
#> `predict' complains about new factor levels, even if the
#"new" levels are
#> merely levels in the original that didn't occur in the
#original fit and were
#> sensibly dropped, and that don't occur in the prediction
#data either.
#This is intentional. The coding for factors is based on t
reported before sending them. Didn't find anything
yesterday, but there they are today in black & white. Must have done
something daft.
cheers
Mark
***
Mark Bravington
CSIRO (CMIS)
PO Box 1538
Castray Esplanade
Hobart
TAS 7001
phone (61) 3 6232 5118
fax
data <- eval(model$call$data, envir)
if (is.null(data))
data <- mf
data <- data[ dimnames( tms)[[1]], ] # MVB
nmt <- colnames(tms)
cheers
Mark
Mark Bravington
CSIRO (CMIS)
PO Box 1538
Castray Esplanade
Hobart
TAS 7001
phone (61) 3 6232 5118
fax (61) 3 6232
i[, drop = TRUE]
nxl <- levels( xi) # MVB: remove droppees
if (any(m <- is.na(match(nxl, xl
stop(paste("factor", nm, "has new level(s)", nxl[m]))
}
}
}
else if (drop.unused.levels) {
<<
) {
# Old code, reliant on maintaining the order of terms: attr(tt,
"predvars") <- attr(termobj, "predvars")[-2]
reorder <- match( sapply( attr( tt, 'variables'), deparse), sapply(
attr( termobj, 'variables'), deparse)) # MVB
attr( tt, 'predva
When something is assigned to an element of a vector that was previously of
length 0, the vector is coerced to the mode of the something, regardless of
whether the coercion is necessary under normal R rules.
In particular, if NA is assigned to an element of a vector that was
previously length 0, t
quot;print", so that
attribute classes are respected).
cheers
Mark
#
#--
#Brian D. Ripley, [EMAIL PROTECTED]
#Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
#University of Oxford, Tel: +44 1865 272861 (self)
#1 Sou
context: I'm experimenting
(as others have done) with storing documentation in a "doc" attribute. I'd
like to be able to give the "doc" attribute a class so I can control how
it's displayed by a default print, without having to derive a new class &
print method f
sting behaviour #2:
> { tcon_ file( 'r123.r'); open( tcon); print( readLines( tcon, n=1));
pushBack( c( '1+', 'c(a)'), tcon);
print( parse( file=tcon, n=1));
print( readLines( tcon)); close( tcon); unlink( 'r123.r') }
[1] "1"
expression(1)
[
19 matches
Mail list logo