Displaying 20 results from an estimated 8000 matches similar to: ""is.qr" definition (PR#465)"
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
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)"]"
2003 Jul 16
2
Is there a bug in qr(..,LAPACK=T)
The following snippet suggests that there is either a bug in qr(,LAPACK=T), or some bug in my understanding. Note that the detected rank is correct (= 2) using the default LINPACK qr, but incorrect (=3) using LAPACK. This is running on Linux Redhat 9.0, using the lapack library that comes with the Redhat distribution. I'm running R 1.7.1 compiled from the source. If the bug is in my
2016 Oct 24
3
typo or stale info in qr man
man for `qr` says that the function uses LINPACK's DQRDC, while it in
fact uses DQRDC2.
```
The QR decomposition of the matrix as computed by LINPACK or LAPACK.
The components in the returned value correspond directly to the values
returned by DQRDC/DGEQP3/ZGEQP3
```
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 Jun 30
1
qr and Moore-Penrose
> Date: Wed, 30 Jun 1999 11:12:24 +0200 (MET DST)
> From: Torsten Hothorn <hothorn at amadeus.statistik.uni-dortmund.de>
>
> yesterday I had a little shock using qr (or lm). having a matrix
>
> X <- cbind(1,diag(3))
> y <- 1:3
>
> the qr.coef returns one NA (because X is singular). So I computed the
> Moore-Penrose inverse of X (just from the
2012 Apr 26
2
How does .Fortran "dqrls" work?
Hi, all.
I want to write some functions like glm() so i studied it.
In glm.fit(), it calls a fortran subroutine named "dqrfit" to compute least
squares solutions
to the system
x * b = y
To learn how "dqrfit" works, I just follow how glm() calls "dqrfit" by my
own example, my codes are given below:
> qr <-
>
2009 Jun 17
3
Matrix inversion-different answers from LAPACK and LINPACK
Hello.
I am trying to invert a matrix, and I am finding that I can get different
answers depending on whether I set LAPACK true or false using "qr". I had
understood that LAPACK is, in general more robust and faster than LINPACK,
so I am confused as to why I am getting what seems to be invalid answers.
The matrix is ostensibly the Hessian for a function I am optimizing. I want
to get
2001 Jun 11
1
Additional output in cancor
Hi everyone,
Can I suggest an additional output component in cancor, from package
mva? It would be useful to have the number of canonical correlation
vectors, equivalently the rank of the covariance between x and y (label
"rank"). This would usually be min(dx, dy), where dx and dy have
already been computed for the svd function, but there might be
situations where it was less than
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,
2010 Feb 17
2
qr test?
I am testing 'qr' with an admittedly contrived matrix and I am getting different results than I am from another package. The matrix that I am using is:
x <- matrix(seq(.1, by=.1, length.out=12), 4)
So the whole test is:
x <- matrix(seq(.1, by=.1, length.out=12), 4)
qr(x)
And the output from 'R' is:
$qr
[,1] [,2] [,3]
[1,] -0.5477226 -1.2780193
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
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
2012 Sep 07
1
Suggest adding a 'pivot' argument to qr.R
I suggest adding a 'pivot' argument to qr.R, to obtain columns in the
same order as the original x, so that
a <- qr(x)
qr.Q(a) %*% qr.R(a, pivot=TRUE)
returns x.
--------------------------------------------------
# File src/library/base/R/qr.R
qr.R <- function(qr, complete = FALSE, pivot = FALSE)
{
# Args:
# qr: a QR decomposition, produced by qr()
# complete:
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 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,
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 Oct 13
2
syntax confusion with function/non-function objects (PR#694)
I'm just back from a computer practical where we ran into
> "f" <- function(x) 2(x^2) # for 2 * x^2
This definition was taken as legitimate, although using the
function generated the error message
> f(3)
Error in f(3) : attempt to apply non-function
Am I right in thinking that in prevous versions of R this
definition would have been declared as a syntax error? Surely a