search for: condition1

Displaying 20 results from an estimated 27 matches for "condition1".

Did you mean: conditions
2012 Nov 24
2
Performing operations only on selected data
...t some time on this simple question, also searched the forum, eventually hacked my way to an ugly solution for my particular problem but I would like to improve my coding: I have data of the form: df <- expand.grid(group=c('copper', 'zinc', 'aluminum', 'nickel'), condition1=c(1:4)) I would like to add a new data column "condition2", with values equal to the value of condition1 plus a random number from 0-1 (uniform distribution) if the value of condition1 is < 1, or just condition1 if the value of condition1 is > 1. More generally, my interest is in...
2010 May 20
1
Mixed Effects Model on Within-Subjects Design
...condition x difficulty pair for each subject, making this an entirely within-subject design. I would like an output that compares the significance of the 3 levels of difficulty for each condition, as well as the overall interaction of condition*difficulty. The ideal output would look like this: condition1:diff25 vs. condition1:diff50 p_value = .... condition1:diff25 vs. condition1:diff75 p_value = .... condition1:diff50 vs. condition1:diff75 p_value = .... condition2:diff25 vs. condition1:diff50 p_value = .... condition2:diff25 vs. condition1:diff75 p_value = .... condition2:diff50 vs. conditi...
2010 Feb 16
1
difftimes; histogram; memory problems
Hi All: Let's say I have two dataframes (Condition1 and Condition2); each being on the order of 12,000 and 16,000 rows; 1 column. The entries contain dates. I'd like to calculate, for each possible pair of dates (that is: Condition1[1:10,000] and Condition2[1:10,000], the number of days difference between the dates in the pair. The result sho...
2011 Dec 08
1
prop.test() and the simultaneous confidence interval for multiple proportions in R
...p.test(). I ask an help because I have some difficulties in reading the output of that function. As a case study, I need to apply such analysis on the following simple prolbem: I did an experiment in which 12 participants had to choose between 3 conditions when provided with 3 stimuli. Stimulus Condition1 Condition2 Condition 3 A 9 1 2 B 10 2 0 C 8 2 2 My goal is to prove that it is not by chance that Condition 1 is preferred rather than the other two conditions. So, I apply the function prop.test(), summing the...
2010 May 31
1
Post-hoc tests for repeated measures in balanced experimental design
...ubjects. Often, the main question is to test the effect of these parameters on the recorded results. When switching from Statview (old software on Mac computers, no longer supported) to R I learned that the problem is translated to a repeated measures ANOVA via ano <- aov(d$Result~ d$Condition1*d$Condition2 + Error(d$Subject/(d $Condition1*d$Condition2), data=d)) However, there are problems in performing post-hoc tests due to the intraindividual correlation of the repeated measures data. So I started intense online searches for a good solution in R, found snippets of R-code here and...
2008 Aug 25
1
lattice : using both strip and strip.left
...k. To illustrate my questions, consider the following example: > library(ggplot2) > library(lattice) > > # example data > x <- seq(0, 10, len = 100) > y1 <- jitter(sin(x), 1000) > y2 <- 0.5*jitter(cos(x), 1000) > > df <- melt( data.frame(x=x, one=y1, two=y2, condition1=factor(c("a", > "b")), condition2=factor(c("1","1", "2", "2"))), > id=c("x", "condition1", "condition2")) > > # custom colors > myColors <- c( "#E41A1C", "#377EB8") &...
2014 Sep 25
5
[LLVMdev] New type of smart pointer for LLVM
...443 <http://reviews.llvm.org/D5443> demonstrates how the solution with a certain type of smart pointer would look like (see changes in TGParser::ParseDef(), TGParser::InstantiateMulticlassDef() and TGParser::ParseSimpleValue()). Briefly: consider a leaky example: { T* p = new T; if (condition1) { f(p); // takes ownership of p } p->SomeMethod(); if (condition2) { return nullptr; // Leak! } g(p); // don't take ownership of p return p; } The preferred solution would look like: { smart_ptr<T> p(new T); if (condition1) { f(p.StopOwn()); /...
2008 Feb 07
1
How to split a factor (unique identifier) into several others?
Hello, I have a data frame with a factor column, which uniquely identifies the observations in the data frame and it looks like this: sample1_condition1_place1 sample2_condition1_place1 sample3_condition1_place1 . . . sample3_condition3_place3 I want to turn it into three separate factor columns "sample", "condition" and "place". This is what I did so far: # generate a factor column for the example fctr<- factor(...
2010 Oct 22
2
If Statement with more than one condition
I'm unable to find the OR operator like other language .. any suggestions? I want to do If (condition1 OR condition 2){ do something } Thanks for answering this elementary question. [[alternative HTML version deleted]]
2008 Aug 13
3
conditional IF with AND
Hi everyone, I'm trying to create an "if" conditional statement with two conditions, whereby the statement is true when condition 1 AND condition 2 are met: code structure: if ?AND? (a[x,y] <condition1>, a[x,y] <condition2>) I've trawled through the help files, but I cannot find an example of the syntax for incorporating an AND in a conditional IF statement. Thanks, rcoder -- View this message in context: http://www.nabble.com/conditional-IF-with-AND-tp18966890p18966890.html Sent...
2010 Apr 30
2
deriving mean from specific cases
Hi all, I have a large dataset that has >10k entries. The dataset is stored in a dataframe with the headers: SubID Condition1 Condition2 Result1 Result2 There are multiple entries for a given SubID(Subject ID). Condition 1 has 3 levels and condition2 has 2 levels (therefore there are 6 possible combinations all together e.g. Cond1 Level1 x Cond2 Level 1 etc.) and i need to compute for 1. The mean for a subject of result1...
2007 Nov 27
2
rearrange data: one line per subject, one column per condition
...2 191.676154 1 7 2 028.175385 ... Here, one line equals the value of one subjects VARIABLE in function of the GROUP and the CONDITION. However, I would like to rearrange the data so that the columns of my data equal the 2 conditions and the lines the subjects. This is something like: subj group condition1 condition2 1 1 746.36625 46.36625 2 2 1076.152857 76.152857 ... I know its possible the other way around. But that's not what I need (this time). Before anyone asks: Yes, I want to do some analysis on my data in SPSS, so I need the rearranged format. Regards and Thanks, Dieter -------------...
2008 Dec 17
4
passing arguments to subset from a function
Hello R-helpers, I'm writing a long function in which I manipulate a certain number of datasets. I want the arguments of said function to allow me to adapt the way I do this. Among other things, I want my function to have an argument which I will pass on to subset() somewhere inside my function. Here is a quick and simplified example with the iris dataset. myfunction<-function(table,
2014 Sep 25
2
[LLVMdev] New type of smart pointer for LLVM
...certain type of smart pointer would look like > (see > > changes in TGParser::ParseDef(), TGParser::InstantiateMulticlassDef() and > > TGParser::ParseSimpleValue()). > > > > Briefly: > > consider a leaky example: > > { > > T* p = new T; > > if (condition1) { > > f(p); // takes ownership of p > > } > > p->SomeMethod(); > > > > if (condition2) { > > return nullptr; // Leak! > > } > > > > g(p); // don't take ownership of p > > return p; > > } > > > &gt...
2011 Dec 13
1
[LLVMdev] Changing the operands in the CallInst
I implement the following function,which gets CallInst * and should perform the following: 1. Change the value of the argument if condition1 takes place 2. Change the type of the argument if condition2 takes place 3. Add addition argument/s if condition3 takes place void argChange(CallInst * I) { for (unsigned index = 0; index < I->getNumOperands(); ++index) { do_something_with (I->getOperand(index),condition);...
2008 Jul 14
1
eval.wih.vis
Hello, I have an error since I run my R code. This error is : Fehler in eval.with.vis(expr, envir, enclos) : > My code is: #CONDITION1 : check if the right logfile is chosen c1=log(z[,3],n) if (c1==FALSE) { plot(0:1,0:1,type = "n", axes=FALSE,xlab="",ylab="") text(0.4,0.8,adj=0,paste("FEHLER"),col="red") text(0.4,0.6,adj=0,paste("Falsche Logfile gew?hlt")) stop()} else {...
2006 Mar 17
2
How to let the layout be more OO?
...the layout.Do I have any methods to let the layout be more OO? I mean that for example,the app currently have more than one views to be displayed,but only some of them to be displayed at the same time at different <div></div> units. I hope there exists a kind of way that: <%= if condition1 %> <div id=''condition1''> <%= @content_for_view1 %> </div> <%= if condition2 %> <div id=''condition2''> <%= @content_for_view2 %> </div> .... How to reach such an aim in rails? I am a newbie. very grateful!...
2009 Mar 06
1
a general question
...tion is more related to ChIP and ChIP-seq, it could be probably anchored in a more general statistical context. The question is : what method is better to assess the significance of the change in a signal (the signal can be DNA binding, for instance) given the background and 2 conditions. <. condition1 (eg no treatment) : background = 1; signal = 5; <. condition2 (eg hormonal treatment) : background = 3; signal = 6. The methods can be : a. substract the background : i.e. (signal_treatment - backgroun...
2009 Jul 15
2
executing some code with subscribe/notify/unless
...=> Exec["refresh_conf"], } exec { "refresh_conf": command => "exec something", #subscribe => File["file1"], timeout => "-1", #unless => "condition1", } So now I have subscribe and unless commented. subscribe because I added notify on file1, and unless cause if file1 notifies to refresh it evaluates conditon1 and,as log is fine, the exec is not refreshed. So, how may I tell refresh_conf to execute itself depending in thos...
2007 Nov 05
1
Should numeric()/character() etc initialize with NA instead of 0 or ""?
...examples) this would be immediately obvious from the value of the vector elements themselves and programming errors would be far less easy to overlook. e.g. x <- numeric(n) or for( i in seq(along = x) ) { try(x[i] <- function.which.might.crash( args[i] )) } or x <- numeric(n) x[condition1] <- foo(args1) x[condition2] <- foo(args2) ... x[conditionN] <- foo(argsN) will produce x without any NAs even if function.which.might.crash() actually did crash during the loop or if there are indices for which none of conditions 1 to N were true and you cannot distinguish between zeroes...