similar to: row sum question

Displaying 20 results from an estimated 3000 matches similar to: "row sum question"

2007 Jun 05
2
generating many matrices
I'd like to generate many matrices (let's say 100 matrices of 4x4), of which diagonal elements are being drawn from each set of sample of known distribution. What would be the best way? I've been trying to find any previous threads for this topic, but haven't been able to find one. Thanks. Kevin [[alternative HTML version deleted]]
2010 Aug 13
1
subsetting data points within confidence limit
Dear R-list Suppose I have a data set stored in hmet, for which I did get confidence limit on a linear regression as shown below. My question is how I can subset only data points which are within the confidence limit. Thank you. Keun-Hyung --------------------------------------------------------------- Al=rnorm(100, 3) Cd=rnorm(100, 0.2) hmet=data.frame(Al=Al, Cd=Cd) plot(Al,
2008 Nov 11
1
data type problem for vegan package
Dear all, I'm using R2.8 version, and am trying to do NMDS and calculate other diversity indices in vegan package. The problem is that it works with a small set of data (43 X 23; row by column), but the following error message comes up with a larger data set (43 X 104) (it seems not large to me at all). I made it sure that all data are of numeric type as required. >gh1.H=diversity(gh1)
2008 Jun 01
2
optim error - repost
Here is a clean version. I did this with nls and it works (see below), but I need to do it with optim. Keun-Hyung # optim vol<-rep(c(0.03, 0.5, 2, 4, 8, 16, 32), 3) time<-rep(c(2,4,8),each=7) p.mated<-c(0.47, 0.48, 0.43, 0.43, 0.26, 0.23, NA, 0.68, 0.62, 0.64, 0.58, 0.53, 0.47, 0.24, 0.8, 0.79, 0.71, 0.56, 0.74, 0.8, 0.47) eury<-data.frame(vol=vol, time=time, p.mated=p.mated)
2008 Nov 12
1
read.table with many blanks (reposting)
Thanks Jim for pointing out how to properly ask. Here is is my question and a small subset of the data and output. I have a data set with many blanks. The blanks should be replaced with zero once imported. I tried read.table, read.csv (R 2.8 version),or scan, but none was successful. Any suggestion, please.. thanks. Keun-Hyung >garoben=read.table("c:\\Rdata\\garoben.txt",header=T,
2014 Jul 14
2
cummax / cummin for complex numbers
Dear all, in R 3.1.0, this is happening: > cummin(c(1+1i,2-3i,4+5i)) Error in cummin(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 'cummax' not defined for complex numbers > cummax(c(1+1i,2-3i,4+5i)) Error in cummax(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 'cummin' not defined for complex numbers It may be fixed in R-devel, but I thought I'd mention it to make sure
2010 Jun 10
3
Retrieving the 2 row of "dist" computations
Dear R Gurus, As you probably know, dist calculates the distance between every two rows of data. What I am interested in is the actual two rows that have the least distance between them, rather than the numerical value of the distance itself. For example, If the minimum distance in the following sample run is d[14], which is .3826119, and the rows are 4 & 6. I need to find a generic way to
2015 May 17
1
The function cummax() seems to have a bug.
Hi, The function cummax() seems to have a bug. > x <- c(NA, 0) > storage.mode(x) <- "integer" > cummax(x) [1] NA 0 The correct result of this case should be NA NA. The mistake in [ https://github.com/wch/r-source/blob/trunk/src/main/cum.c#L130-L136] may be the reason. Best Regards, Dongcan -- Dongcan Jiang Team of Search Engine & Web Mining School of Electronic
2011 Mar 01
1
Speed up sum of outer products?
Hi, I'm new to R and stats, and I'm trying to speed up the following sum, for (i in 1:n){ C = C + (X[i,] %o% X[i,]) # the sum of outer products - this is very slow according to Rprof() } where X is a data matrix (nrows=1000 X ncols=50), and n=1000. The sum has to be calculated over 10,000 times for different X. I think it is similar to estimating a co-variance matrix for demeaned
2008 Jan 07
3
Seeking a more efficient way to find partition maxima
Hi. Suppose I have a vector that I partition into disjoint, contiguous subvectors. For example, let v = c(1,4,2,6,7,5), partition it into three subvectors, v1 = v[1:3], v2 = v[4], v3 = v[5:6]. I want to find the maximum element of each subvector. In this example, max(v1) is 4, max(v2) is 6, max(v3) is 7. If I knew that the successive subvector maxima would never decrease, as in the example,
2003 Feb 23
2
Extracting the dispersion parameter
I have been unsuccessful in extracting the dispersion parameter in SPLUS 6.1 using summary or summary.glm(modelobj$dispersion) from a glm object in which the family was set to quasi. This is the syntax given in the manual. I want to write a script to bootstrap the estimate of the dispersion parameter, but cannot seem to access that value. Any suggestions? Thanks, Ed ----------
2009 Jan 18
3
[LLVMdev] Qs on building LLVM passes
Hi, I have couple of questions that those who design unconventional passes would be interested in. 1. How to move a virtual register data to another new virtual register? It seems like that there is no LLVM instruction similar to mov machine instruction. Arithmetic or logical operators could be used for integer variables but what about pointer variables? 2. What is
2009 Jan 15
2
[LLVMdev] Testcase for OS kernel
Hi, The source attached at the bottom is a testcase which causes a back-end error in LLVM 2.4. These types of assembly routines are mainly used in OS kernels. I checked that GCC 4.3 works for this routine. The error messsage is ... Couldn't allocate output reg for constraint 'A'! I just need help or comments so that I could analyze and fix this bug. My
2008 Apr 05
2
Adding a Matrix Exponentiation Operator
Hi all I recently started to write a matrix exponentiation operator for R (by adding a new operator definition to names.c, and adding the following code to arrays.c). It is not finished yet, but I would like to solicit some comments, as there are a few areas of R's internals that I am still feeling my way around. Firstly: 1) Would there be interest in adding a new operator %^% that performs
2008 Dec 14
3
[LLVMdev] How to correlate LLVA with native ISA
Thank your for reply. The reason why these information are needed is that I am trying to extract the program signature (e.g., control flow) out side of the binary. Conventional compiler technique adds extra checking code into the target source or target IR in an invasive manner. Since code generator combines the added code with the original one, they don't need to correlate these two
2008 Dec 08
0
[LLVMdev] How to correlate LLVA with native ISA
Keun Soo Yim wrote: > > Hi, > > How to correlate the LLVM IR-leve instructions and memory values > with the machine instructions and memory locations? Can you tell us what goal you are trying to accomplish that requires you to do this? There might be better ways of doing what you want. The answer to your question probably depends on whether you're trying to write a
2012 Sep 09
1
Addition of Eucalyptus to IaaS section
Hello there, I?m not sure if this is the right mailing list, but I?d like to see if we can add Eucalyptus to the IaaS page here: http://libvirt.org/apps.html#iaas Please let me know what is required in order to add us? Thanks very much, *_________________________* *Eric Choi - *Product Marketing *Eucalyptus Systems* www.eucalyptus.com +1 508 348-9778 Follow us on Twitter
2010 Nov 10
2
Parallel code runs slower!
My parallel code is running slower than my non-parallel code! Can someone pls advise what am I doing wrong here? t and tTA are simple matrices of equal dimensions. #NON PARALLEL CODE nCols=ncol(t) nRows=nrow(t) tTA = matrix(nrow=nRows,ncol=nCols) require(TTR) system.time( for (i in 1:nCols) { x = t[,i] xROC = ROC(x) tTA[,i]=xROC } ) user system elapsed 123.24 0.07 123.47 #
2003 May 01
2
What' wrong?
I try to do single proportion test on my category data. Here is my R script: library("ctest") catSignifTest <- function( catFile ) { ############################################################### ## Get the data sets from text file catData <- read.table( catFile ) ncols <- length(catData) nrows <- length(catData[,1]) ncol1 <- ncols - 1 probeNbr
2008 Dec 08
2
[LLVMdev] How to correlate LLVA with native ISA
Hi, How to correlate the LLVM IR-leve instructions and memory values with the machine instructions and memory locations? For example, if CMP instruction in machine ISA is selected for the ICMP instruction in LLVA, with the Instruction datastructure for ICMP, is it possible to get the memory address of CMP instruction? Assume that the code segment base address is given. Similarly, by