search for: comb

Displaying 20 results from an estimated 299 matches for "comb".

Did you mean: com
2008 May 14
4
Accessing items in a list of lists
Using R 2.6.2, say I have the following list of lists, "comb": data1 <- list(a = 1, b = 2, c = 3) data2 <- list(a = 4, b = 5, c = 6) data3 <- list(a = 3, b = 6, c = 9) comb <- list(data1 = data1, data2 = data2, data3 = data3) So that all names for the lowest level list are common. How can I most efficiently access all of the sublist items...
2007 May 11
1
model seleciton by leave-one-out cross-validation
...0000e+00 1.000000e+00 1.000000e+00 0.000000e+00 1.292513e-06 So does anybody know how to do linear model selection by leave-one-out cross-validation? I've written one function, but it runs toooooo slow~~~ Thanks firstly This is my super slow function: #################### ## function: rec.comb ## input: vec -- vector ## output: all possible combination from the elements of vec #################### rec.comb=function(vec) { if(length(vec)==0){list(NULL) }else { tmp=rec.comb(vec[-1]) tmp2=sapply(tmp,function(x)c(vec[1],x)) c(tmp,tmp2) } } #################### ## function: CV1...
2012 Jun 12
2
[LLVMdev] How to use LLVM optimizations with clang
Thanks alot. How can we view those optimization which are enabled when we do llc -O3 comb.ll Are these the same as the ones produced by the following command line llvm-as < /dev/null | opt -O3 -disable-output -debug-pass=Arguments Regards Shahzad On Tue, Jun 12, 2012 at 1:01 PM, Duncan Sands <baldrick at free.fr> wrote: >> Yes. But how exactly code generation (optimi...
2012 Nov 18
1
identical matrices
Dear R users, I want to check matrices when i change the order of the rows or/and the order of the columns or/and the combination of them i will give an example what i want  1  -1  1  1      1  1   1  1 -1  -1 -1 -1    -1 -1  -1  -1   1  1    1  1     1 -1    1   1 these 2 matrices are identical because i change the first row and make it third   1  -1  1  1      -1  1   1  1 -1  -1 -1 -1    -1 -1  -1  -1   1  1...
2012 Jun 12
2
[LLVMdev] How to use LLVM optimizations with clang
Thanks again. I executed the following command line llc -O3 comb.ll.bc -debug-pass=Arguments and got Pass Arguments: -targetdata -targetpassconfig -no-aa -tbaa -targetlibinfo -basicaa -collector-metadata -machinemoduleinfo -machine-branch-prob -preverify -domtree -verify -loops -loop-simplify -scalar-evolution -loop-simplify -iv-users -loop-reduce -gc-lowerin...
2011 Jan 05
4
Match numeric vector against rows in a matrix?
Two posts in one day is not a good day...and this question seems like it should have an obvious answer: I have a matrix where rows are unique combinations of 1's and 0's: > combs=as.matrix(expand.grid(c(0,1),c(0,1))) > combs Var1 Var2 [1,] 0 0 [2,] 1 0 [3,] 0 1 [4,] 1 1 I want a single function that will give the row index containing an exact match with vector x: > x=c(0,1) The solution needs...
2012 Jun 12
0
[LLVMdev] How to use LLVM optimizations with clang
Hi, On 12/06/12 13:09, Abdul Wahid Memon wrote: > Thanks alot. How can we view those optimization which are enabled when we do > > llc -O3 comb.ll llc -O3 comb.ll -debug-pass=Arguments > > Are these the same as the ones produced by the following command line no, as I mentioned before they are of a completely different nature to the optimizations that opt does. Ciao, Duncan. > > llvm-as< /dev/null | opt -O3 -disable-out...
2012 Jun 12
0
[LLVMdev] How to use LLVM optimizations with clang
Hi, > I executed the following command line > > llc -O3 comb.ll.bc -debug-pass=Arguments > > and got > > Pass Arguments: -targetdata -targetpassconfig -no-aa -tbaa > -targetlibinfo -basicaa -collector-metadata -machinemoduleinfo > -machine-branch-prob -preverify -domtree -verify -loops -loop-simplify > -scalar-evolution -loop-simplify -...
2012 Jun 28
6
How can I make a list using aggregate function?
...need to generate a list, that should contain the quantile value of one column in a data frame. while I am compiling this one i am facing one bug,, Really I cannot find out that where the problem has occurred? Could any one help me to come out from this bug?? Here is the code, data <- lapply(comb.data$zFE, function(x) aggregate(x, by=list(comb.data[["sequence"]]), quantile, probs=c(0.5,0.8,0.9), na.rm=T)) And I am facing bug like this, "Error in aggregate.data.frame(as.data.frame(x), ...) : arguments must have same length" Thanks, Suresh -- View this message in c...
2012 Jun 12
2
[LLVMdev] How to use LLVM optimizations with clang
...generating code as is done by clang or llc? Regards Shahzad On Tue, Jun 12, 2012 at 12:42 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi, the reason is that lli does optimized code generation by default, while > clang does unoptimized codegen by default.  Use this >  clang -O2 comb.ll > instead. > > Ciao, Duncan.
2010 Jul 19
1
divide grid.newpage into two?
...ary(meta) data(Olkin95) meta1 <- metabin(event.e, n.e, event.c, n.c,data=Olkin95, subset=c(41,47,51,59),sm="RR", meth="I",studlab=author) meta2=meta1 meta2$studlab=rep("",length(meta1$studlab) ) #deleting the labels for the second plot grid.newpage() forest(meta1, comb.fixed=F, comb.random=F, rightcols="effect",leftcols="studlab") forest(meta2, comb.fixed=F, comb.random=TRUE, leftcols="studlab",leftlabs="") #they are superimposed... which is not what I want. Any hints/ideas much appreciated! Many thanks Eleni Rapsomanik...
2012 Jun 12
0
[LLVMdev] How to use LLVM optimizations with clang
> Yes. But how exactly code generation (optimized one) be done without > clang. Is it possible that we can specify those optimization > (individual ones instead of standard ones like -O3) some how when > generating code as is done by clang or llc? llc comb.ll gcc -o comb comb.s Variants: llc -O0 comb.ll llc -O3 comb.ll etc Note that the codegen level optimizations done by llc have nothing to do with the IR level optimizations of the kind performed by opt. Ciao, Duncan.
2010 Nov 07
3
Integrate and mapply
...e very grateful for an advice on this matter. The code is below. The function needed to be integrated (undint with respect to u from 0 to Inf). Sincerely, V. Code rm=list(ls()) #index matrix t1<-c(1:15) t2<-c(1:5)%x%matrix(1,3,1) t3<-matrix(1,3,1)%x%c(1:5) t4<-c(1:3)%x%matrix(1,5,1) comb<-cbind(t1,t2,t3,t4) nu<-rchisq(15,4) gam<-matrix(rchisq(75,df=5),15,5) undint<-function(u){ prob<-function(i) { i1<-comb[i,1] i2<-comb[i,2] i3<-comb[i,3] i4<-comb[i,4] val1<-gam[((i3-1)*2+1):(i3*2),i4] vc1<-matrix(12,length(val1),1)-matrix(u,length(val1),1)-val1...
2010 Jan 30
2
parsing files for plot
...his like: count<-1 files <- list.files() # all files in the working directory for(i in files) { tmp <- scan(i) assign(files[count], tmp) count<-count+1 } This part works! Now I like to plot the data in a boxplot. Usually I do this from individual vectors like: comb <- data.frame(dat = c(vector1, vector2 ......), ind = c(rep('vector1', length(vector1)).......)) boxplot(dat ~ ind, data = comb) But how do I do this i a loop? I know the vector names (according to the filenames in the working directory), but I do not how to access them in my R code af...
2008 Oct 09
2
Help MLE
Dear, I'm starting on R language. I would like some help to implement a MLE function. I wish to obtain the variables values (alpha12, w_g12, w_u12) that maximize the function LL = Y*ln(alpha12 + g*w_g12 + u*w_u12). Following the code: rm(list=ls()) ls() library(stats4) Model = function(alpha12,w_g12,w_u12) { Y = 1 u = 0.5 g = -1 Y*log(alpha12 + g*w_g12 + u*w_u12) } res =
2012 Nov 19
1
Help: Meta-analysis with metacor
...plain the error? > cor<-c(-0.3018, 0.667, -3.8002, -0.607, -0.4885, -3.8002, -0.0701, 0.1348, -0.9505, -0.5709, -0.6127, -1.2419, -0.1511, -0.1054)> n<-c(3,4,3,3,3,3,16,36,30,9,3,3,30,4)> library(meta)> metacor(cor, n, data=NULL, subset=NULL, sm="ZCOR", level=0.95, level.comb=level, comb.fixed=TRUE, comb.random=TRUE, hakn=NULL, method.tau="DL", tau.preset=NULL, TE.tau=NULL, method.bias="linreg", title="title", complab="comparison", outclab="outcome") Error in data.frame(subset = NULL, comb.fixed = TRUE, comb.random = TRU...
2009 Dec 11
3
Correcting for missing data combinations
...ring if there was a simple/elegant solution within R instead. I have a table that looks something like the following: Factor1 Factor2 Value A 11/11/2009 5 A 11/12/2009 4 B 11/11/2009 7 B 11/13/2009 8 >From that I need to generate all permutations of Factor1 and Factor2 and force a 0 for any combination that doesn?t exist in the actual data table. By way of example, I?d like the output for above to end up as: Factor1 Factor2 Value A 11/11/2009 5 A 11/12/2009 4 A 11/13/2009 0 B 11/11/2009 7 B 11/12/2009 0 B 11/13/2009 8 Truly appreciate any thoughts. -- View this message in context: h...
2006 Aug 14
1
left-justified fixed-width format
...a in fixed-width format without headers and reading the help archive leads me to believe that sprintf is pretty much the only way to do this. My question is, is there anyway to change the output so the text in each column is left justified instead of right justified? My code sample is below where comb is the data frame. TIA, Roger out <- sprintf("%6s %22s %8s %15s %7s %5s", comb$tic, substr(as.character(comb$conm), 1, 22), comb$cusip, comb$type, comb$exchange, comb$currency) write.table(out, file="c:/pit/portia_test.txt", row.names=FALSE, col.names=FALSE, quote=FALSE)...
2016 Nov 02
5
Problems with GPO
...resa.com.br AD (1), Sysvol (65535) GPOs Denied Name Location Link Denial Reason Local Group Policies Location EMPTY {0F1E5B10-3640-4FFE-AA6B-5DE4CFF73625} empresa.com.br Inacessible {D65C5B66-A380-48AD-AC8A-DE417173E293} empresa.comb.br/EMPRESA/SecInfor Inacessible Wallpaper empresa.comb.br/EMPRESA/SecInfor Inacessible How can I debug this problem ? Regards, Márcio
2012 Oct 31
3
expand.grip for permutations
if i were to have a block size of 4 people and i want to assign a treatment combination to the entire block, there would be 16 different treatment combinations (TTTT, TTTP, TTPP, PTTP, etc.) i am trying to get all 16 permutations and i am able to use this code below. drugs=c('P','T'); comb=expand.grid(drugs,drugs,drugs,drugs) for a block size of 3 the code wo...