Displaying 20 results from an estimated 40000 matches similar to: "names<- bug, and incompatibility with c() (PR#2358)"
2004 Jun 09
1
Using macros
Dear list members,
I've been puzzling over how best to clean up the code for my Rcmdr package.
In particular, there's a lot of repetitive tcltk code in the package, and as
Martin M?chler has pointed out to me, this makes the package difficult to
maintain.
If R were Lisp, I'd use macros for much of the clean up. My efforts to do
similar things with R functions has run into problems
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),
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
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 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 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(
2003 Jan 30
2
print.default and attributes
When something gets printed by the "print.default" function, any extra
attributes are printed without regard to their class attribute (if any). For
example:
> x <- 1:3
> attr( x, 'other') <- factor( c( 'cat', 'dog'))
> attr( x, 'other')
[1] cat dog
Levels: cat dog
> x
[1] 1 2 3
attr(,"other")
[1] 1 2
which is perhaps
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,
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 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
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)
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("[.][.]",
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.
2004 Nov 23
3
str() resets class for environments
I noticed the following today --- str() seems to remove any extra
class information added to an environment.
> e <- new.env()
> class(e)
[1] "environment"
> class(e) <- c("foo", class(e))
> class(e)
[1] "foo" "environment"
> str(e)
Classes 'foo', 'environment' length 0 <environment>
> class(e)
[1]
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
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
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,
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
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