similar to: Help: Sort components of a vector with indices tracked in R

Displaying 20 results from an estimated 4000 matches similar to: "Help: Sort components of a vector with indices tracked in R"

2011 Apr 18
1
Extract indices after comparing two vectors
Dear All, I would like to ask a question about how to locate the indices after comparing two numeric vectors. Say, I have, A <- c(1,2,3,4) and A <- c(0,3,1,5) and we cmpare: > idx <- A<B So: > idx [1] FALSE TRUE FALSE TRUE Question 1: I would like to get a vector that stores the indices for entries of A such that this relationship is true. In this case, a vector idx1
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:
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:
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
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: 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:
2011 Nov 06
1
Request for Help: remove zero in fraction from tick labeling
Dear All, I would like to know how to do the following: 1. suppose I have x values from the ordered from 0, 0.5, 1, and would like to label these three points on the x-axis. 2. However, R labels them as 0.0, 0.5, 1.0. But I wan5 them to be 0, .5, 1, since the former way uses limited space of a multi-subgrap plot by adding extra zeros Thank you, Chee [[alternative HTML version deleted]]
2013 Feb 02
2
Question: write an R script with help information available to the user
Dear All, I would like to ask a question on how to incorporate into an R script help information for the user. I vaguely recall that I saw some instructions on an R manual, but am not able to figure them out. Hereunder is the basic setting: 1. I finished writing an R script, my_script.r, that is a function (the function is named "my_func") for a statistical procedure. This means that
2018 Mar 15
1
[GSoC 2018] Integrate with Z3 SMT solver to reduce false positives.
Hi all, I am a fourth year EE bachelors student who is very interested in compilers. I have taken the only compilers course offered in my school and did an independent study with my CS professor. Although I'll begin to work in a couple of months, I definitely want to pursue my interest in compiler design and optimization as a PhD in the future. I am very interested in the z3 SMT solver
2003 May 26
1
Computer cannot join Samba3.0 PDC domain
Hi: setup: Samba-3.0alpha24 with OpenLDAP 2.1.20 client: XP smbclient test with an LDAP user works But I cannot join the domain PDC (with root, uidNumber = 0): 1. if I set passwd backend = ldapsam_compat, I got: Access Denied 2. if I set passwd backend = ldapsam_compat, ldapsam, I got No mapping between account names and security IDs was done. The machine account was created on the fly
2003 Aug 25
1
Swat problem with samba-3.0.0 RC1
Hello, I tried to configure a share with samba-3.0.0RC1 but after specifying the share name and after I clicked "create", nothing happens. Only the header "share parameters" is shown. I've searched the list archives and a certain Chee Wai Yeung reported exactly the same problem with samba3.0.0beta1 on 09/06/2003 Will this bug be fixed before the final release? Werner
2003 Jul 18
2
Samba3 PDC with LDAP
Dear All, I still cannot get Samba3 (beta3) to work as PDC with LDAP backend. I still encounter the problem of having to join an XP workstation two times in succession before the join is successful. This does not happen on Samba2.2.8a. For both Samba 2.2.8a and samba3 beta i have workstation accounts added directly to ldap (via add-machine-script) without adding a corresponding entry in