Displaying 20 results from an estimated 10000 matches similar to: "print.default and attributes"
2003 Mar 26
2
predict (PR#2685)
There is a bug in `predict' whereby the order of variables sometimes gets
re-arranged compared to the original fit, and then disaster results.
Specifically, the 'variables' and 'predvars' attributes of a 'terms' object
get out of synch. This only happens when the terms in the original formula
get re-ordered during fitting:
test> scrunge.data_ data.frame(
2003 Mar 26
5
predict (PR#2686)
# r-bugs@r-project.org
`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. (At
least if `drop.unused.levels' was set to TRUE, which the default.)
test> scrunge.data.2_ data.frame( y=runif( 3),
2008 Nov 10
3
how to stop without error message?
Dear list
Can anyone suggest a simple way to abort execution like stop(...) does, but without issuing an "Error: ..." message?
I don't want to set 'options( show.error.messages=TRUE)' because I want normal behaviour to resume after this particular stop.
(Please reply personally as well as to the list, as I'm not subscribed to R-help)
Thanks
Mark
--
Mark Bravington
2003 Sep 24
1
getAnywhere (PR#4275)
'getAnywhere' is not reporting methods when there are periods in the class name or the generic name
(in R-devel).
> getAnywhere( 'predict.loess')
A single object matching 'predict.loess' was found
It was found in the following places
registered S3 method for predict from namespace modreg
namespace:modreg
with value
<<...>>
> getAnywhere(
2002 Dec 27
1
Wish list: add an "until" or "EOF.marker" parameter to scan & rea dLines
A bit late for Santa, but on my wish-list nevertheless:
is there any chance that "scan" and "readLines" could be extended to take a
parameter "until" or "EOF.marker", which would be a character string that
(if encountered while reading) would cause the reading to stop, just as if
an end-of-file had been found? [But leaving a connection open, so that
2004 Sep 08
3
having trouble building r-devel
Dear R-devel
On my Windows 2000 machine, I can build R-patched but not R-devel (since at least 1/9/2004). An error message pops up during the execution of some R code during "make", as below. In terms of "make" etc., I am totally clueless (not being a user of either Linux or C) and just mechanically follow the instructions in the R documentation; hence I've got no idea
2011 Sep 16
1
grep problem in R-devel 2.14 r57004
Problem below with PCRE grep in R-devel; works fine in R-patched. (Unless there's been an absolutely massive change in rules for updated PCRE version 8.13; jeez I hope not)
> grep( '[.][.]', '', perl=TRUE)
Error in grep("[.][.]", "", perl = TRUE) :
invalid regular expression '[.][.]'
In addition: Warning message:
In grep("[.][.]",
2002 Oct 21
1
savehistory directories and quitting R (PR#2038)
Thanks-- as Duncan Murdoch also noted, R_HISTFILE can be used to solve my
problem, as below. BTW it's not easy to find out about R_HISTFILE in the
help system or manuals, though, unless you already know it exists-- it only
seems to be described under startup options, not things to do with history.
However, Duncan's reply did hint at an inconsistency, in that savehistory()
defaults to
2002 Nov 20
2
restart
Dear group
I use "restart" in part of my code, in a way that's not easily changed to
"try". As I convert code from R1.5.0 to R1.6.1, I'm getting ugly messages;
the help system says to contact r-devel, so here I am. This one's a bit
complicated-- sorry!
The context is inside a debugger (I have an R and S debugger that offers
stand-alone code windows, line numbered
2005 Aug 23
5
TCITex and R
Several times my packages have fallen foul of the latex check at the
uploading-to-CRAN stage, creating extra work for Kurt Hornik. I've never
bothered trying to get latex working on my own packages (happy with
vanilla help) but am told that "latex is the closest thing to a syntax
checker for Rd files" and that I should set it up. Now, there is already
a latex on my (Windows XP)
2006 Jan 09
2
Problem installing from source: no CONTENTS files
I've just had the error below while trying to install a package from
source under R2.2.1 and Windows XP. I recall encountering this
sporadically in the past. It is a pretty confusing message and took me
quite some time to figure out; I've seen queries about it on the R site
search, but couldn't find a reply. There's an attempted diagnosis and
suggested cure below.
2002 May 16
1
(PR#1558)
My reading of the R documentation is that the nature of the subscript i in
x[[i]] is not specified; the only obvious rule is that it should lead to to
a single element. Which is what I'm after: a way of extracting or changing
the 4th element of the 2nd element of a list. Incidentally, the operational
difficulty comes in general programming when I don't know in advance how
many levels down
2005 Sep 15
4
Rd and guillemots
First of all, thanks to those who've set up R to work so smoothly with
Miktex-- even a total Latex bunny like me got it to work instantly, so
that for the first time I'm able to run my Rd files through the Latex
side of RCMD CHECK.
Now the question/buglet. One of my Rd files contains the following:
\code{mlazy( <<objname1>>, <<objname2>>, <<etc>>)}
2004 Mar 09
3
update forgets about offset() (PR#6656)
In R1.7 and above (including R 1.9 alpha), 'update.formula' forgets to copy any offset(...) term in the original '.' formula:
test> df <- data.frame( x=1:4, y=sqrt( 1:4), z=c(2:4,1))
test> fit1 <- glm( y~offset(x)+z, data=df)
test> fit1$call
glm(formula = y ~ offset(x) + z, data = df)
test> fit1u <- update( fit1, ~.)
test> fit1u$call
glm(formula = y ~ z,
2002 Sep 19
3
savehistory directories and quitting R (PR#2038)
#
# r-bugs@r-project.org
#
######################################################
Because I work in different directories, but always want to save my
.Rhistory in the same place, I have changed the system function savehistory
to this:
function (file = "D:/R50/.Rhistory")
invisible(.Internal(savehistory(file)))
When I use q() to quit R, and it asks me whether I want to
2002 Oct 18
4
code to turn T into TRUE
Does anyone have code that will methodically process R sourcecode, turning
T's into TRUE and F's into FALSE? I got bored doing this by hand, after the
first 30-odd functions-- there are hundreds left to do. I don't want to
simply deparse everything, because that would destroy my beautiful
formatting.
The reason it's not trivial, is that comment lines, quotes, and split lines
need
2007 Oct 10
2
slow load() in R2.6.0
I'm encountering excruciatingly slow load times for character vectors in
R 2.6.0-- up to 30sec for a 15K file that contains a no-attributes
character vector of length ~1e4 and object size ~0.5MB. In R 2.5.1,
repeated loads of the same set of files are near-instantaneous.
The problem is proving tricky to reproduce consistently from scratch, so
I have attached the 3 files used in the examples
2005 Mar 22
4
trouble building r-devel
I haven't been able to build yesterday's R-devel (or, as a test,
R-devel_2005-03-11) on Windows XP. The error message I'm getting is to
do with 'arithmetic.c', as shown below.
Current R-patched seems to build fine, and I've built previous R-devels
from source fairly often in the past-- though I have no understanding
whatsoever of what's going on. FWIW the only changes
2005 Feb 11
3
getAnywhere and functions starting with "." (PR#7684)
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 might be to replace the line
if ( !is.null(f <- getS3method(gen, cl, TRUE))) {
with
if ( nchar( gen)
2002 Dec 01
7
Samples of external code with various compilers?
R can run external code in C, C++, Fortran, Delphi, etc., but the R
extensions manual only gives limited documentation for anything but C
and C++. It would be useful to have a collection of sample code
showing how to dyn.load functions written in other languages, if
necessary for a variety of different compilers, in case that makes a
difference.
Does such a collection already exist? If not,