similar to: legend()

Displaying 20 results from an estimated 2000 matches similar to: "legend()"

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 Aug 25
2
Error in ?text (PR#256)
Just a minor point, but the adj argument in ?text is described wrongly (0.64.1). Perhaps the following might be added to the details. Values of 0, 0.5, and 1 specify left/top, middle and right/bottom, respectively. The default is for centred text, ie \code{adj = c(0.5, 0.5)}. Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of
2002 Mar 21
1
legend - bug with argument angle (PR#1404)
When legend() is used with the angle argument as follows, not only the boxes beside the legend text, but also the whole legend box is filled with shading lines. I think this is not intended: plot(1:10) legend(8, 4, c("A", "B"), angle=c(10, 80), fill=NULL, density=20) I'd suggest as a fix (legend.R of R-1.5.0): 25c25 < rect2 <- function(left, top, dx, dy,
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
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,
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
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)
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
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
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
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 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
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 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
2001 Aug 27
1
colorbar legend for image()
Hi, are there any plans to add a colorbar legend to image()? Or such a possibility already implemented which I just haven't discovered yet. Anyway, I will be willing to spent some time on the implementation if there isn't anyone working on that already. Thanks Thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read
2009 Aug 27
1
Wishlist: specify the border color of boxes in legend() (PR#13913)
I could not find a way to specify the border color of the boxes drawn in a legend, so that the legend can match exactly the colors of the actual plot (e.g. in the case of two superimposed histograms which have different shading and different borders). Indeed, the legend function seems to hard code the color "black" for the borders in this call: rect2(left = xt, top = yt +