Displaying 20 results from an estimated 6000 matches similar to: "Error in ?text (PR#256)"
1999 Aug 18
2
diag()
I would like to suggest a slight modification to diag(). In the case
where x is a matrix with both row names and column names the same, it
would be reasonable if the resulting vector also had those names. I often
use diag() on variance matrices, where this modification is helpful.
The modification requires replacing
if (is.matrix(x) && nargs() == 1)
return(c(x)[1 +
1999 Apr 30
1
legend()
In legend() is it possibly to mix lines and boxes? I would like to do
something like
legend(locator(1), legend = c("al", "ben", "chris", "dave"), lty =
c(1, 2, 3, NA), fill = c(NA, NA, NA, "gray"))
to indicate that "al", "ben" and "chris" have lines, and "dave" has a gray
shading.
Many thanks,
1999 Oct 26
1
dodgy list operation (PR#298)
I can generate a segmentation fault as follows, where I would expect a
syntax error:
fred <- as.list(1:10)
lapply(fred, "[[")
platform sparc-sun-solaris2.5.1
arch sparc
os solaris2.5.1
system sparc, solaris2.5.1
status
status.rev 0
major 0
minor 64.1
1999 Jul 20
2
tensor() function and sets
Hi Everyone,
To complete the outer() and kronecker() functions in the base, may I
suggest the following tensor() function, which allows the multiplication
of arrays through sets of conformable dimensions. I am happy to write a
help page if required.
The code also needs a setdiff() function which prompts me to ask: what
about simple set functions? I expect many of us have written our own
2002 Mar 15
1
Thought on crossprod
Hi everyone,
I do a lot of work with large variance matrices, and I like to use
"crossprod" for speed and to keep everything symmetric, i.e. I often
compute "crossprod(Q %*% t(A))" for "A %*% Sigma %*% t(A)", where
"Sigma" decomposes as "t(Q) %*% Q". I notice in the code that
"crossprod", current definition
> crossprod
function (x,
2002 Aug 20
1
NA and help page for "&" and "|"
Hi everyone,
Can I suggest an addition to the help page for logical AND and OR,
indicating the behaviour of NA (which is currently not mentioned at
all). I think something simple like an extra paragraph in Details, eg
\code{NA} is a valid logical object. Where a component of \code{x} or
\code{y} is \code{NA}, the result will be \code{NA} if the outcome is
ambiguous. In other words \code{NA
2000 Mar 01
1
"is.qr" definition (PR#465)
Might it be possible to tighten the definition of "is.qr". I
noticed that after I mistakenly typed
example(lm) # make lm object named lm.D9
qr.Q(lm.D9)
which exhausted the heap memory and produced two warning
messages. As an object of class "lm" has a "qr" component,
"is.qr" failed to detect that "lm.D9" was not a "qr" object. The
2001 Nov 13
1
Small change to "cut.default"
Hi everyone,
Can I suggest the following cosmetic change to cut.default (R-1.3.1), to
adjust the labels in the case that include.lowest = TRUE:
arrow:dma0jcr% diff -u cut.R my.cut.R
--- cut.R Tue Nov 13 12:28:35 2001
+++ my.cut.R Tue Nov 13 12:35:16 2001
@@ -25,6 +25,11 @@
ch.br[-nb], ",", ch.br[-1],
if(right)"]"
1999 Nov 04
2
New codes() methods
Hi Everyone,
Can I suggest a couple of new `codes' methods. I know codes is a bit
dodgy (at least, according to the comments in codes.factor), but for what
it's worth I like to extract codes from data frames of factors, for which
the following two functions (which operate recursively) are helpful:
"codes.default" <-
function(x)
{
if (is.list(x))
lapply(x, codes)
1999 Feb 17
1
dim enquiry
This is a minor question, but is there any difference between the two
objects
fred <- structure(1:10, dim = c(2,5))
and
fred <- structure(1:10, .Dim = c(2,5))
Should I be using one rather than the other? Thanks, Jonathan.
Jonathan Rougier Science Laboratories
Department of Mathematical Sciences South Road
University of Durham Durham DH1 3LE
1999 Jan 14
1
libraries
Am I right in thinking that there a discrepancy between the ?library
documentation and the library() function? If I have a library called
"patches", then according to the documentation (0.62.4) patches/R should
contain source files like fred.R and george.R, but in practice the library
only loads if both fred.R and george.R are given in a file called patches
in the R subdirectory of
2000 Jan 04
2
set functions
I wonder if we might also include an "equiv" function along with the other
set functions (ie "union", "intersect", etc), perhaps along the lines of
"equiv" <- function(x, y) all(c(match(x, y, 0)>0, match(y, x, 0)>0))
(which I think might be the quickest implementation). I use this type of
function quite frequently: is there some reason why it is
2000 Jan 04
2
set functions
I wonder if we might also include an "equiv" function along with the other
set functions (ie "union", "intersect", etc), perhaps along the lines of
"equiv" <- function(x, y) all(c(match(x, y, 0)>0, match(y, x, 0)>0))
(which I think might be the quickest implementation). I use this type of
function quite frequently: is there some reason why it is
1999 Sep 27
2
chol() dimnames
Hi Everyone,
Just a minor point, but could chol() be changed to include the dimnames of
the original matrix? This will ensure that x and t(R) %*% R have the same
dimnames, where R <- chol(x). So we just need to insert
if (!is.null(dx <- dimnames(x)))
dimnames(z$v) <- dx
ahead of the return. Cheers, Jonathan.
Jonathan Rougier Science Laboratories
1999 Feb 10
1
Function parsing (PR#118)
Is anyone else concerned with the way in which the R function parser
relocates comments that occur after condional expressions in functions to
before, i.e.
fred <- function(x) {
# wonder what x is like
if (x>0) stop("Sorry non-positive x only")
# that showed x big-time!
x
}
but then fred is parsed and stored as
"fred" <-
function (x)
{
# wonder what x is
1999 Oct 08
1
dimnames and subscripting (PR#293)
I am not sure that this is a bug, but it was unexpected -- of course my
expectations are fallible, eg column ordering in model.matrix()! When an
array is subscripted the names of the dimnames list are lost (v 64.1).
fred <- array(1:12, 2:4, list(A = letters[1:2], B = letters[3:5], C =
letters[6:9]))
dimnames(fred)
dimnames(fred[1, , ])
dimnames(fred[1, , , drop=FALSE])
In the first
1999 Jan 20
2
dist function suggestion
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---559023410-162216788-916833047=:29339
Content-Type: TEXT/PLAIN; charset=US-ASCII
On my R installation (0.62.4) there is no dist() function, so I attach one
possibility. It provides
2003 Mar 27
1
Deprecated component in plot.histogram (PR#2696)
Hi everyone,
As "intensities" is deprecated as a synonym for "density" in the
output of hist it would be a good idea to replace its occurence with
"density" in plot.histogram, where we currently have
y <- if (freq)
x$counts
else x$intensities
Note that, to add to the confusion, x$density is also referred to in
plot.histogram.
Cheers, Jonathan.
2000 Feb 01
2
Segmentation fault in recursion, 0.90.1 (PR#409)
The following gives an immediate segmentation fault, v 0.90.1
"fred" <- function(x) { print(x); Recall(x-1)}
fred(0) # segmentation fault at recursion 831
Obviously this recursion is non-terminating, but shouldn't it be caught
and reported at some limit? In 0.64.1 we had
Error: protect(): stack overflow
at recursion 831. Cheers, Jonathan.
Jonathan Rougier
1999 Nov 13
1
image()
May I raise the issue of the behaviour of image()? In image() dim(z) is
supposed to be c(length(x), length(y)). This suggests that the user is
supplying the midpoints of the rectangles. For all but the outer
rectangles this is true. The outer rectangles, however, are only
displayed in half width. So it is not possible to show correctly an image
plot of equally-spaced abscissa. I would hazard