similar to: Ifelse statements and combining columns

Displaying 20 results from an estimated 700 matches similar to: "Ifelse statements and combining columns"

2017 Jul 24
0
Ifelse statements and combining columns
Not a reproducible example, so a bit of guessing here, but a) don't try to assign results to variables inside the ifelse. That is, remove all the single-equals signs and "test" variables. If you really need to conditionally assign variables then use "if"... but chances are good you don't need that. b) "closure" is effectively another word
2009 Sep 04
1
User defined function's argument as Subset function's input
Dear R users, I have a data where I desire to subset according to certain conditions. However, the script is very messy as there are about 30 distinct conditions. (i.e. same script but with different conditions) I would like to make a user defined function so that I can input the desired conditions and just get the results accordingly. Below is an arbitrary data set & sample statements
2002 Mar 04
2
Plotting a x axis from a vector with rownames
Hi all, suppose there is a vector y with rownames: > y cond1 cond2 cond3 cond4 78.952 87.308 86.490 74.040 how can I easily plot this vector using the rownames? plot(y) gives me a plot with a x-axis from 1 to 4 in 0.5 steps, also plot(rownames(y), y) and plot(y ~ rownames(y) don't work. I know I can build a x-axis with axis(1, ...), but in this case I need a character string like
2011 Oct 19
3
[LLVMdev] Question regarding basic-block placement optimization
On Tue, Oct 18, 2011 at 6:58 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote: > > On Oct 18, 2011, at 5:22 PM, Chandler Carruth wrote: > > As for why it should be an IR pass, mostly because once the selection dag >> runs through the code, we can never recover all of the freedom we have at >> the IR level. To start with, splicing MBBs around requires known about
2011 Jun 17
4
profile plot in R
Hi friends, I have a matrix with following format. group var1 var2 .......varN c1 group1 1.2399 1.4990....-1.4829 c2 group4 0.8989 0.7849.....1.8933 ... ... c100 group10 ..... I want to draw a profile plot of each condition c1 to c100, which rows in above matrix and each line representing a row should be uniquely colored according to the group(1 to 10). I think this is simple task
2012 May 04
0
[LLVMdev] Extending GetElementPointer, or Premature Linearization Considered Harmful
Hi Preston, On Fri, May 4, 2012 at 9:12 AM, Preston Briggs <preston.briggs at gmail.com> wrote: > > which produces > > %arrayidx24 = getelementptr inbounds [100 x [100 x i64]]* %A, i64 > %arrayidx21.sum, i64 %add1411, i64 %add > store i64 0, i64* %arrayidx24, align 8 > {{{(5 + ((3 + %n) * %n)),+,(2 * %n * %n)}<%for.cond1.preheader>,+,(4 *
2012 May 04
3
[LLVMdev] Extending GetElementPointer, or Premature Linearization Considered Harmful
Is there any chance of replacing/extending the GEP instruction? As noted in the GEP FAQ, GEPs don't support variable-length arrays; when the front ends have to support VLAs, they linearize the subscript expressions, throwing away information. The FAQ suggests that folks interested in writing an analysis that understands array indices (I'm thinking of dependence analysis) should be
2013 Apr 23
2
Problemas con NA y el calculo de un promedio ponderado
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Estimada comunidad, tengo el siguiente problema: 1. tengo un data.frame con varias columnas, algunas numericas, otras son variables categoricas 2. necesito hacer un calculo simple sobre este data.frame (un promedio ponderado de los valores de la columna 7), pero solo para las filas que cumplan ciertos criterios 3. en ocasiones ninguna de las filas
2008 Oct 01
2
[LLVMdev] complex branching generation
LLVM seems to be generating way too complex of branching based on the short-circuit optimization. The code in question is as follows: define void @ test_fc_while_and(float %x, float %y, float addrspace(11)* %result) nounwind { entry: %tobool3 = fcmp une float %x, 0.000000e+000 ; <i1> [#uses=1] %tobool24 = fcmp une float %y, 0.000000e+000 ;
2009 Aug 24
4
Is there a fast way to do several hundred thousand ANOVA tests?
Dear R users, I have a matrix a and a classification vector b such that > str(a) num [1:50, 1:800000] and > str(b) Factor w/ 3 levels "cond1","cond2","cond3" I'd like to do an anova on all 800000 columns and record the F statistic for each test; I currently do this using f.stat.vec <- numeric(length(a[1,]) for (i in 1:length(a[1,]) { f.test.frame
2011 Dec 10
3
PCA on high dimentional data
Hi: I have a large dataset mydata, of 1000 rows and 1000 columns. The rows have gene names and columns have condition names (cond1, cond2, cond3, etc). mydata<- read.table(file="c:/file1.mtx", header=TRUE, sep="") I applied PCA as follows: data_after_pca<- prcomp(mydata, retx=TRUE, center=TRUE, scale.=TRUE); Now i get 1000 PCs and i choose first three PCs and make a
2009 Nov 21
3
"subset" or "condition" as argument to a function
Dear Rxperts! I was wondering if it is possible to write a function which can take in argument of a subset or condition.. Of course, I am aware of the alternate methods like coplot, par.plot, xyplot etc... I am specifically interested in using conditions/subsets with "plot".. A simple fragmented example is shown here.. pltit <- function(y,x,dat,dat1,dat2,sbst) { plot(y~x, data=dat,
2016 Aug 10
3
SCEV LoopTripCount
Hello, I was doing some experiments with SCEV and especially the loop trip count. Sorry for the dumb question, what is the easiest way to dump SCEV analysis results on a .bc file? On a side note, I wanted to see if we could optimize this function: unsigned long kernel(long w, long h, long d) { unsigned long count = 0; for(int i = 0; i < w; ++i) for(int j = i; j < h; ++j) for(int k = j; k
2006 Aug 16
1
matching pairs in a Dataframe?
Dear list, I want to extract pairs of values out of a dataframe where one criteria/condition does match. I have an experiment with 3 conditions which were not always applied: e.g.: group cond x A 1 2 A 2 4 A 3 6.5 B 1 3 B 2 4.5 C 1 2.5 C 3 4 D 2 5 D 3
2011 Oct 19
0
[LLVMdev] Question regarding basic-block placement optimization
On Wed, Oct 19, 2011 at 3:24 AM, Chandler Carruth <chandlerc at google.com>wrote: > On Tue, Oct 18, 2011 at 6:58 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote: > >> >> On Oct 18, 2011, at 5:22 PM, Chandler Carruth wrote: >> >> As for why it should be an IR pass, mostly because once the selection >>> dag runs through the code, we can never
2012 Sep 07
2
Contrasts for 2x4 interaction in mixed effects model
Hello everyone, I am running a mixed effects model where I have two fixed factors, one with 2 levels and one with 4, and their interaction. Let's say these are my factors and their levels: FirstFactor: 1, 2 SecondFactor: A, B, C, D For the interaction, I am interested in the four two-way comparisons, not the two four-way comparisons. In other words, I want to test whether 1A is
2012 Dec 05
1
Using multcomp::glht() with Anova object
Hello everyone, I've conducted a Type III repeated-measures ANOVA using Anova() from the car package, based on the suggestions at http://blog.gribblelab.org/2009/03/09/repeated-measures-anova-using-r/(option 3) and http://languagescience.umd.edu/wiki/EEG#ERP_ANOVA_in_R. My ANOVA has two factors: Condition (3 levels) and Region (6 levels) and their interaction. Below is code to run the Anova
2010 Oct 27
3
[LLVMdev] Scalar Evolution not canonalizing division?
Hi, I am just found a scalar evolution function that does not seem canonical to me. The C code I used to produce it is: long foo (long n, long m) { long i, j; long A[n][m]; for (i = 0; i < n; ++i) for (j = 0; j < m; ++j) A[i][j] = 1; return A[42][42]; } This produces after applying -mem2reg the attached LLVM-IR. For the store to the array A in the loop I get
2012 Jan 26
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Thu, Jan 26, 2012 at 3:41 PM, Hal Finkel <hfinkel at anl.gov> wrote: > On Thu, 2012-01-26 at 15:36 -0600, Sebastian Pop wrote: >> arm-none-linux-gnueabi > > Indeed, adding -ccc-host-triple arm-none-linux-gnueabi I also get Minor remark: please use -target instead of -ccc-host-triple that is now deprecated. Thanks for looking at this testcase. Sebastian -- Qualcomm
2012 Jan 26
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Thu, 2012-01-26 at 15:36 -0600, Sebastian Pop wrote: > arm-none-linux-gnueabi Indeed, adding -ccc-host-triple arm-none-linux-gnueabi I also get vectorization (even though I don't get vectorization when targeting x86_64). I'll let you know what I find. -Hal -- Hal Finkel Postdoctoral Appointee Leadership Computing Facility Argonne National Laboratory