similar to: Extract indices after comparing two vectors

Displaying 20 results from an estimated 4000 matches similar to: "Extract indices after comparing two vectors"

2011 Aug 23
1
Help: Sort components of a vector with indices tracked in R
Dear All, I would like to know how to sort a vector of numeric values such that we know the original index of each ordered component. Say, we have c <- c(1,4,3,2) csort <- sort(c,descreasing=FALSE) With a few components of c, we can manually find out: csort[1] = 1 = c[1], ie, the original index of csort[1] is 1, csort[2] =2 =c[4], ie, the original index of csort[2] is 4. When length(c) is
2013 Apr 05
4
[LLVMdev] A strange testing case of SROA
Hi, Following is excerpted from dynamic-vector-gep.ll. The resulting "extractelement" seems to always return 0.0f regardless the value idx1 and idx2 is holding. Am I missing something here or there is something fishy take place? Thanks Shuxin 101 ; CHECK: test6 102 ; CHECK: insertelement <4 x float> zeroinitializer, float 1.000000e+00, i32 %idx1 103 ; CHECK:
2013 Apr 05
0
[LLVMdev] A strange testing case of SROA
Hi Shuxin I think i might have written that test. And yeah, no matter what values you get you’ll get a 0.0. Its probably a bad test case, but i can’t remember if it exposed a bug in this form or not. Since writing it Chandler rewrote SROA anyway so the original bug is long gone. Thanks, Pete On Apr 5, 2013, at 11:57 AM, Shuxin Yang <shuxin.llvm at gmail.com> wrote: > Hi, > >
2011 Dec 12
2
[LLVMdev] GetElementPtr
For the gep: %idx1 = getelementptr i32* %MyVar, i32 0 i32* is the type that MyVar is pointing to and i32 is the type of the offset value, or what? If it's the type of offset value, then the size of the pointer shouldn't be less than i32, correct? The index is 0, so in this example, the address computation is idx1 = &MyVar+0. What I want to know is the size in bits of the values
2011 Dec 12
0
[LLVMdev] GetElementPtr
On Mon, Dec 12, 2011 at 3:54 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > For the gep: > > %idx1 = getelementptr i32* %MyVar, i32 0 > > i32* is the type that MyVar is pointing to and i32 is the type of the offset > value, or what? If it's the type of offset value, then > the size of the pointer shouldn't be less than i32, correct? > > > The index is
2011 Apr 29
3
How to define specially nested functions
Dear All, I would like to define a function: f(x,y,z) with three arguments x,y,z, such that: given values for x,y, f(x,y,z) is still a function of z and that I am still allowed to find the root in terms of z when x,y are given. For example: f(x,y,z) = x+y + (x^2-z), given x=1,y=3, f(1,3,z)= 1+3+1-z is a function of z, and then I can use R to find the root z=5. Thank you. -Chee [[alternative
2016 May 09
2
C++ CreateConstGEP questions
There are two C++ signatures for CreateConstGEP1_32: Value * CreateConstGEP1_32 (Value *Ptr, unsigned Idx0, const Twine &Name="") Value * CreateConstGEP1_32 (Type *Ty, Value *Ptr, unsigned Idx0, const Twine &Name="") I'm assuming that this means that the caller can supply the expected type, and get error checking or casting? Or choose to not supply the
2004 Dec 01
3
core dump during make check when building 64-bit R on Solaris8/9
Hi, After reading some of the posting in this list, I came across this posting from: From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk> Date: Fri 29 Oct 2004 - 08:02:40 EST Replying to Re: [R] Errors during make check He described a problem similar to mine, that build 64-bit R (I am building R version 2.0.1) with sunperf library gives a core dump during make check. So I configured my
2011 Aug 24
2
Help: find the index of the minimum of entries
Dear All, I would like to ask a question on how to find the index of the minimum of entries of a numeric vector, without using loops or user defined functions. Suppose we have a vector: a <- c(3,1,2) then, min(a) = 1 and its index is 2. Target: how to get the index of this minimum? How to get the indices if multiple entries assume this same minimum? Thank you, Chee [[alternative HTML
2012 Jan 24
2
Help: read a proportion of high through-put data
Dear All, I have a text file, tab delimited, called "sample.txt",as follows: ID_REF 382 GC_Score Theta R B_Allele_Freq Log_R_Ratio 200003 BB 0.9101527 0.9734979 0.8788951 1 0 200006 AB 0.6003323 0.4385073 2.033364 0.4850979 0.01553433 I have explored various options of the command: read.table, with one as:
2015 Jun 11
2
[LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
> On Jun 10, 2015, at 11:44 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote: > >> Base is treated as unsigned so 0xff…ff + 1 would be 0x100…00 > > This is the part I was missing, thanks for pointing out the FAQ. So > the infinitely precise address computed by a GEP is > > zext(Base) + sext(Idx0) + sext(Idx1) … ? Yes, that is the way I read it.
2003 Jun 09
1
Swat documentation broken
Just installed samba-3.0.0beta1 and trying to use swat. When clicked on help on a particular paramenter (any one), a new window pops up and supposingly it will load smb.conf.5.html and then jumps to the label of the parameter. But now it doesn't work. smb.conf.5.html is no longer complete. Checked under docs/docbook/smbdotconf and found that smb.conf.5.xml supposingly should include files
2011 Apr 15
1
How to generate a correlation matrix with restrictions on its eigenvalues
Dear All, I would like to generate m positive real numbers c_i, I=1,...,m, such that (1) c_1 + c_2 + ... + c_m=m, (1) after being ordered into c_1 >= c_2 >= .... >=c_m>0, we have that c_m is of the same order of m^(-1/8), when m is sufficiently large. Thanks, -Chee [[alternative HTML version deleted]]
2011 May 01
2
Question on where samples are grouped in rmvnorm{mvtnorm}
Dear All, For function: rmvnorm{mvtnorm} in (library mvtnorm, not splus2R), if I generate 2 bivariate normal samples as follows: > rmvnorm(2,mean=rep(0,2),sigma=diag(2)) [,1] [,2] [1,] 2.0749459 1.4932752 [2,] -0.9886333 0.3832266 Where is the first sample, it is stored in the first row or the first column? Does this function store samples row-wise or column-wise? Thank
2011 Aug 24
1
Help: extrac the first entry for each component of a list
Dear All, I would like to know, beside writing a function and then apply it to a list, or using a for loop, whether there is a one-line command to do the following. Suppose we have a list, each of whose components are numeric: > a <- vector("list",3) > a[[1]] <-c(1,2) > a[[2]] <-c(3,4) > a[[3]] <- c(5,6) > a [[1]] [1] 1 2 [[2]] [1] 3 4 [[3]] [1] 5 6 Target:
2011 Aug 24
1
Help: convert entry of a list into a matrix
Dear All, As always, I appreciate all your help. I would like to know the easiest way to convert each of the homogeneous elements of a numeric list into a matrix. Each element of this list is also a list such that when displayed, looks like a 2-by-3 matrix , I would like to convert each of them into a matrix, without changing the double index of each entry. Suppose: a<-
2012 Mar 10
1
Help on subgraphs in xyplot of lattice library
Dear All, I would like to ask a question on how to do overlay plots in each subgraph of xyplot. 1. I did simulations for m=1000, 2500, 5000, 10000, as the sample sizes. 2. for each sample size value m, 4 graphs are generated; each graph contains overlayed comparisons between 4 methods, 3. now I want put them into a 4-by-4 plot by xyplot, i.e., 4 sample size values, each of which has 4 plots.
2001 Sep 10
1
Multiresponse parameter estimation
I am looking for a way to do multiresponse parameter estimation for a problem that is quite similar in form to the alpha-pinene example in Bates and Watts (1988), p. 147, where the model is a set of ODEs. I am specifically interested in obtaining the parameter covariance matrix, as well. Which package(s) in R would I use to do such a thing? Mark Schaffer Dept. of Chemical Engineering
2011 Apr 19
1
How to get the tuning parameter lamda in storey's qvalue package
Dear All, In Storey's estimator of the proportion of true nulls, the estimator depends on the tuning parameter lamda. Suppose now that an estimator of this proportion has been obtained by the qvalue package, what is the lamda that corresponds to the estimate? How to get this lamda? Thanks, -Chee [[alternative HTML version deleted]]
2011 Apr 22
1
How to generate normal mixture random variables with given covariance function
Dear All, Suppose Z_i, i=1,...,m are marginally identically distributed as a two normal mixture p0*N(0,1) + (1-p0) *N( miu_i, 1) where miu_i are identically distributed according to a mixture and I have generated Z_i one by one . Now suppose these m random variables are jointly m-dimensional normal with correlation matrix M= (m_ij). How to proceed next or how to start correctly ? Question: