similar to: Why is the diag function so slow (for extraction)?

Displaying 20 results from an estimated 200 matches similar to: "Why is the diag function so slow (for extraction)?"

2015 May 05
3
Why is the diag function so slow (for extraction)?
Looks like the c(x)[...] bit used to be as.matrix(x)[...]. Not sure why the change was made many years ago, but this was before names were handled explicitly. It would definitely be better to not force the duplicate, at least in the case where we are sure c() and [ would not dispatch. Best, luke On Mon, 4 May 2015, peter dalgaard wrote: > >> On 04 May 2015, at 19:59 , franknarf
2015 May 04
0
Why is the diag function so slow (for extraction)?
> On 04 May 2015, at 19:59 , franknarf <by.hook.or at gmail.com> wrote: > > But I'm still wondering why diag() uses c()...? With it being so slow, I'd > be inclined to write a qdiag() without the c() and just use that the next > time I need matrix algebra. Any insight would be appreciated; thanks! Well, there are two possibilities: Either it is deliberate or it
2015 May 07
0
Why is the diag function so slow (for extraction)?
Is it possible to replace c() with .subset()? Example below #### #### library(microbenchmark) diag2 <- function(x,nrow, ncol){ if (is.matrix(x)) { if (nargs() > 1L) stop("'nrow' or 'ncol' cannot be specified when 'x' is a matrix") if ((m <- min(dim(x))) == 0L) return(vector(typeof(x), 0L)) # replace this part y <-
2015 May 13
0
Why is the diag function so slow (for extraction)?
Along Luke's lines, would(n't) it be enough to look for existence of attribute 'class' to decide whether to dispatch or not, i.e. if c() is needed or not? Even without .subset(), there is a remarkable improvement. I think it's worth condition the code on dispatch or not. For example: [HB-X201]{hb}: svn diff diag.R Index: diag.R
2015 May 13
1
Why is the diag function so slow (for extraction)?
> From: Martin Maechler <maechler at lynne.stat.math.ethz.ch> > diag() should not work only for pure matrices, but for all > "matrix-like" objects for which ``the usual methods'' work, such > as > as.vector(.), c(.) > > That's why there has been the c(.) in there. > > You can always make code faster if you write the code so it only >
2015 May 12
2
Why is the diag function so slow (for extraction)?
>>>>> Steve Bronder <sbronder at stevebronder.com> >>>>> on Thu, 7 May 2015 11:49:49 -0400 writes: > Is it possible to replace c() with .subset()? It would be possible, but I think "entirely" wrong. .subset() is documented to be an internal function not to be used "lightly" and more to the point it is documented to *NOT*
2015 May 13
1
Why is the diag function so slow (for extraction)?
As kindly pointed out to me (oh my decaying gray matter), is.object() is better suited for this test; $ svn diff src/library/base/R/diag.R Index: src/library/base/R/diag.R =================================================================== --- src/library/base/R/diag.R (revision 68345) +++ src/library/base/R/diag.R (working copy) @@ -23,9 +23,11 @@ stop("'nrow' or
2010 Jan 07
1
"diag", "diag<-" and "[" , "[<-"
Dear all I have the following problem. M <- matrix(0,3,3) # dimension of M is dinamic and this can lead to the next subscript diag(M[1,1]) <- rep(100,1) #Error in `diag<-`(`*tmp*`, value = 100) : # only matrix diagonals can be replaced diag(M[1,1,drop=F]) <- rep(100,1) #Error in diag(M[1, 1, drop = F]) <- rep(100, 1) : # incorrect number of subscripts diag(M[2:3,1:2]) <-
2004 Feb 11
0
gelman.diag question
Dear Friends, I am trying to use the gelman-rubin convergence test. I generated a matrix samp[10,000x86] with the gibbs sampler. the test requires the creation of "mcmc" objects. Since I don't know how to define samp as a "mcmc" object, I tried to create one mcmc object by means of the mcmc() function. With this function I tried to create a mcmc object dul from samp but I
2007 Apr 18
0
Error in geweke.diag function of coda package
Hi R users, Does anybody knows for the following erro after running geweke.diag(MCMC.sampled, frac1=0.1, frac2=0.5) Erro em glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, : la??o interno 1; n??o ?? poss??vel corrigir o tamanho do passo Al??m disso: Warning messages: 1: algoritmo n??o convergiu in: glm.fit(x = X, y = Y, weights = weights, start = start,
2011 Apr 22
1
[PATCH][git-pull] diag/geodsp/: Fixes/Improvements
git://git.zytor.com/users/genec/syslinux.git Branch diag-geodsp-for-hpa Numerous improvements, most notably that we no longer make 3 8MiB images during a build, the .img.xz files will stay untouched after a 'make clean;make' and use the program variables from MCONFIG. I'm still trying to figure out if there's a way to have/simulate a prerequisite that is ignored when not present
2006 Sep 12
0
Problem with geweke.diag
Dear R-users, I have some problems with the geweke.diag-Function of the coda-package. I try to obtain the Geweke-diagnostic by using the following, simple code: library(coda) input.geweke = as.mcmc(input.matrix) #input.matrix is a 25.000 x 35 matrix with the 25.000 saved draws of the 35 parameters of interest output = geweke.diag(input.geweke) However, I get the following
2011 Oct 20
1
rose.diag in CircStats package
Dear R community, I tried to post a query about the use of the rose.diag function from the CircStats package to the r-help forum a few days ago. It gave all appearances of having been successful. It would have been my first post; I am correctly recieving all the R-help emails, but  but the message has not appeared anywhere on the forum. Am I held up by the moderator somewhere? any help would be
2011 Apr 30
2
[PATCH][git-pull] diag/geodsp
git://git.zytor.com/users/genec/syslinux.git Branch diag-geodsp-for-hpa http://git.zytor.com/?p=users/genec/syslinux.git;a=shortlog;h=refs/heads/diag-geodsp-for-hpa Updates to diag/geodsp/Makefile and an additional variable (XZ) in mk/syslinux.mk. This removes unnecessary parts and makes the recipes more generic by using make variables. -- -Gene
2012 May 27
0
[git-pull] diag/mbr fixes
The following changes since commit 7c1b588f9a918b5e251773f0ef4f3812859cc159: H. Peter Anvin (1): Merge remote-tracking branch 'genec/diag-geodsp-perl-for-hpa' are available in the git repository at: git://github.com/geneC/syslinux.git diag-mbr-fix-for-hpa Gene Cumm (1): diag/mbr: Clarify README Jean-Christian de Rivaz (1): Update diag/mbr instruction to match
2004 Sep 14
0
OpenSSH flow diag
Hello I am wanting to know if anybody knows of or has documented the OpenSSH source code logic flow in some form? I have recently taken on the responsibility for the support of OpenSSH for a large investment bank in the UK. As scratchy as my C skills are, I have already corrected a number of problems on our AIX platforms. However, a logic diag would be of much use. Any help appreciated. Kind
2015 Oct 05
0
[PATCH 1/4] diag/mbr: fix dependency to linker script
From: Sylvain Gault <sylvain.gault at gmail.com> The Makefile used to have a dependency to an unused linker script. Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com> --- diag/mbr/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diag/mbr/Makefile b/diag/mbr/Makefile index 5b7153c..7901fea 100644 --- a/diag/mbr/Makefile +++ b/diag/mbr/Makefile @@
2018 Dec 18
1
[PATCH] virtio-ccw: diag 500 may return a negative cookie
If something goes wrong in the kvm io bus handling, the virtio-ccw diagnose may return a negative error value in the cookie gpr. Document this. Signed-off-by: Cornelia Huck <cohuck at redhat.com> --- Even if the virtio spec is the correct place to specify what diag 500 subcode 3 does, we also should mention here that the cookie may be an error. ---
2003 Apr 12
1
Fails test 8 of smb diag proc
"net view \\slack1" command on Win98 client returns "Error 86: The specified network password is not correct." The samba server (slack1) appears in Network Neighborhood. But I can't logon. Resource: \\SLACK1\IPC$ Password: Password is incorrect. The installation passes tests 1-7 of Samba Diagnosis Procedure. Same Win98 client passes all tests on a RedHat 6.2
1999 Oct 31
1
diag
A change to diag() between 0.65.0 and 0.65.1 which seems undocumented in the logs (apparently revision 1.3.2.1, `diag names') introduced if (is.array(x)) stop("first argument is array, but not matrix.") which has broken the code in rpart. This looks wrong to me, as diag used to cope happily with a single-dimensional array. Such things occur quite often as the output