search for: rougier

Displaying 20 results from an estimated 121 matches for "rougier".

2002 Nov 22
4
Small change to plot.xy
...<- codes(col) .Internal(plot.xy(xy, type, pch, lty, col, bg, cex, ...)) } <environment: namespace:base> and I think it is natural and not really wrong to want to type, say, > data(iris) > pairs(iris[, 1:4], col = iris[, 5]) and get the colours. Cheers, Jonathan. -- Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388 http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html
2001 Apr 11
5
replicating lists
...to loop through the components and setting them individually. I've had a quick look in do_rep in seq.c and to my untrained eye it looks as though the LISTSXP case of the main switch might need to be replaced by a VECSXP, but I am not sure about other implications. Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388 http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2002 Oct 08
3
hash argument of new.env()
Hi everyone, There is no mention in ?new.env (R-1.6.0) of what the effect of setting the hash argument of new.env() actually does. What does it mean in performance terms to say that "the environment will be hashed"? Thanks, Jonathan. -- Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388 http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
1999 Aug 18
2
diag()
...thing like if (is.matrix(x) && nargs() == 1) { y <- c(x)[1 + 0:(min(dim(x)) - 1) * (dim(x)[1] + 1)] if (!is.null(nms <- dimnames(x)) && all(nms[[1]]==nms[[2]])) names(y) <- nms[[1]] return(y) } Just a thought, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) -.-.-...
1999 Jun 17
1
save.image() (PR#212)
Jonathan Rougier <J.C.Rougier@durham.ac.uk> writes: > Would it be reasonable to suggest adding an `all' flag to save.image(), > i.e. > > "save.image" <- > function (f = ".RData", all.names = F) > eval(substitute(save(list = ls(all.names = all.names), file = f)),...
2000 May 19
7
variance of a scalar (PR#546)
I was surprised to find that the variance of a scalar, using var(), is NA. Surely this should be zero? Cheers, Jonathan. --please do not edit the information below-- Version: platform = sparc-sun-solaris2.7 arch = sparc os = solaris2.7 system = sparc, solaris2.7 status = Patched major = 0 minor = 99.0 year = 2000 month = February day = 9 language = R Search Path: .GlobalEnv,
2001 Jan 09
3
Inconsistent behaviour in solve (PR#805)
I find this a bit puzzling ... > solve(matrix(c(5, 2, 3, 1), 2, 2), c(Inf, 3)) [1] NaN Inf > solve(matrix(c(5, 2, 3, 1), 2, 2)) %*% c(Inf, 3) [,1] [1,] -Inf [2,] Inf I would expect the answer to be c(-Inf, Inf), so why has the -Inf been replaced by NaN in solve? Cheers, Jonathan. --please do not edit the information below-- Version: platform = sparc-sun-solaris2.7 arch = sparc
1999 Aug 25
2
Error in ?text (PR#256)
...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 Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) -.-....
1999 Jan 20
2
dist function suggestion
...there is no dist() function, so I attach one possibility. It provides Euclidean distances only, but it does compute dist(X, Y) as a matrix, as well as dist(X) as a vector of lower-triangular values; naturally dist(X, X) gives the full distance matrix of X. Hope this is useful, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) ---55...
1999 Nov 04
2
New codes() methods
...frames in the default function I thought in the end that this was making a presumption about the interpretation of the rows and columns that was not justified. After all, you could still do codes(as.data.frame(matrix(1:12, 3, 4))) if the presumption *was* justified. Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) -.-.-...
1999 Jul 20
2
tensor() function and sets
...ich prompts me to ask: what about simple set functions? I expect many of us have written our own (Brian has a setdiff() in drop1.lm(), for example), which seems like a good reason for putting versions in the base. I would be happy to provide mine for general scrutiny. Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "setdiff" <- function (x, y) x[!(x %in% y)] "tensor" <- function (A, B, da, db) { # tensor product of A and B through d...
2000 Apr 06
2
Strange behaviour of image (PR#510)
The following commands z <- matrix(seq(0, 1, len=1000)) image(z, 1, z, zlim=c(0, 1), col=gray(1:10/10)) appear to violate the image functionality as described on the help page. As I understand it, by specifying a zlim of c(0, 1) and a colour vector of length 10, the colours should correspond to the intervals (0, 0.1), (0.1, 0.2), ..., (0.9, 1.0), this being 10 equally-spaced intervals on (0,
1999 Jan 14
1
libraries
...ording 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 patches. Or have I missed something? Many thanks, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) -.-.-...
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 "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) -.-.-...
2000 Nov 10
1
Modification to cov and cor
...r(iris$Species) > cor(iris) # modified function Error in data.matrix(x) : non-numeric data type in frame as opposed to > cor(iris) # original function Error in cor(iris) : missing observations in cov/cor In addition: Warning message: NAs introduced by coercion Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing li...
2001 Apr 11
0
replicating lists (fwd) (PR#907)
Filed as a bug, as suggested by Brian R., Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388 http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html ---------- Forwarded message ---------- Date: W...
2002 Mar 15
1
Thought on crossprod
...ecial. I'd like to extend crossprod to something like > crossprod function(x, y = NULL) if (is.null(y)) .Internal(crossprod.symm(x)) else .Internal(crossprod(x, y)) Before I start mesing up my R-1.4.1 installation, does anyone have any thoughts on this? Cheers, Jonathan. -- Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388 http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2002 Aug 20
1
NA and help page for "&" and "|"
...SE} evaluates to \code{FALSE}. See the examples below. And so it might also be a good idea to add a truth-table to the examples, eg # construct truth table for logical & x <- c(NA, FALSE, TRUE) names(x) <- as.character(x) outer(x, x, "&") Cheers, Jonathan. -- Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388 http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2000 Jan 04
2
set functions
...tc), 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 not in the base? Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) -.-....
2000 Jan 04
2
set functions
...tc), 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 not in the base? Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) -.-....