similar to: nScree

Displaying 20 results from an estimated 1000 matches similar to: "nScree"

2012 Feb 03
0
Nested? Two-way ANOVA with repeated measures
Dear R-users, I have 3 plant populations (fixed). Within each population there is the same number of “families” (random) – the seed progeny of the same plant. These families were exposed to 2 treatments (fixed) and their response was measured (mean values for 25 seedlings per family per treatment are presented in data table). I would like to know if there is a significant difference in the
2010 Nov 29
1
cross tabulate variables by subject id
Dear list, I have data like this: dat1 <- data.frame(subject=rep(1:10,2), cond1=rep(c("A","B"),each=5), cond2=rep(c("C","D"),each=10), choice=sample(0:1,10,replace=TRUE)) I would like to compare subjects' "choice" for (cond1=="A" & cond2=="C") vs
2007 Dec 04
2
Multiple stacked barplots on the same graph?
Dear R-Users, I would like to know whether it is possible to draw several stacked barplots (i.e. side by side on the same sheet)... my data look like : Cond1 Cond1' Cond2 Cond2' Compartment 1 11,81 2,05 12,49 0,70 Compartment 2 10,51 1,98 13,56 0,85 Compartment 3 1,95 0,63 2,81 0,22 Compartment 4 2,08 0,17
2007 Oct 10
1
Deleting for() loop in function
Dear UseRs, I wrote following function in order to solve Data Envelopment Analysis. Reason for posting is that the function is slow when nrow(dat) is large. I wonder if other functions could substitute the for() loop in the code, such as mapply(). Can anybody help to rewrite the dea() function as efficiently as possible? The code is as follows:
2012 Sep 27
2
equivalent of Stata "by construct"
I am evaluating a switch from Stata to R. I don't need to extensive Statistical methods, but the main reason I am exploring the switch is the coding flexibility in R (e.g. Stata does not support linear/quadratic programming). I have been going over the R syntax and I had a quick question: In Stata, one has a very useful construction called "by", e.g. by month signal: gen xxx =
2018 Apr 10
0
Question about subset
Thanks. That works great! > df <- data.frame(x=c(1,1,NA,NA,2), y=c('a','a','a','b','b'), z=c(TRUE,FALSE,TRUE,FALSE,TRUE)) > cond1 <- 'x==1' > cond2 <- 'x==1 & z' > df x y z 1 1 a TRUE 2 1 a FALSE 3 NA a TRUE 4 NA b FALSE 5 2 b TRUE > subset(df, subset = ifelse(is.na(eval(parse(text=cond1))), TRUE,
2003 Jul 25
0
Sweave and Printing Lattice Figures From Loop
Community, (Windows Xp , 1.7.1, too little memory) This may have the flavor of an answer in search of a question, but I'll pose this question: Is their a better way to do the following than what I'll show below? Problem: In Sweave I have multiple figures from lattice, some of which have more that one page. I can easily figure out the total number of figures I have created, but its
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
2015 Jul 16
3
[LLVMdev] why LoopUnswitch pass does not constant fold conditional branch and merge blocks
Hi, I have a general question on LoopUnswtich pass. Consider the following IR snippet: define i32 @test(i1 %cond) { br label %loop_begin loop_begin: br i1 %cond, label %loop_body, label %loop_exit loop_body: br label %do_something do_something: call void @some_func() noreturn nounwind br label %loop_begin loop_exit: ret i32 0 } declare void @some_func() noreturn After running
2012 Mar 19
3
Issue with asin()
Hello everyone, I am working for a few days already on a basic algorithm, very common in applied agronomy, that aims to determine the degree-days necessary for a given individual to reach a given growth stade. The algorithm (and context) is explained here: http://www.oardc.ohio-state.edu/gdd/glossary.htm , and so I implemented my function in R as follows: DD <- function(Tmin, Tmax, Tseuil,
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
2006 Jun 20
0
inplace assignment: solution
I worked this out over the weekend. I appreciate that using temporary variables would be simpler but I think this makes for quite readable code: # in RProfile.site inplace <- function (f, arg=1) eval.parent(call("<-",substitute(f)[[arg+1]], f),2) # examples in code inplace(foo[bar,baz] *2) # or inplace(paste(foo[bar,baz], 1:10)) # or inplace(sub("blah",
2017 May 22
5
[poison] is select-of-select to logic+select allowed?
Some InstCombine transforms for select-of-select were added here: https://reviews.llvm.org/rL228409 But Alive says this is more poisonous: Name: selsel %s1 = select i1 %cond1, i8 C1, i8 C2 %s2 = select i1 %cond2, i8 %s1, i8 C2 => %andcond = and i1 %cond1, %cond2 %s2 = select i1 %andcond, i8 C1, i8 C2 http://rise4fun.com/Alive/JT6 Are those transforms legal? -------------- next part
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
2016 Nov 02
2
(RFC) Encoding code duplication factor in discriminator
----- Original Message ----- > From: "Dehao Chen" <dehao at google.com> > To: "Hal Finkel" <hfinkel at anl.gov> > Cc: "llvm-dev" <llvm-dev at lists.llvm.org>, "Xinliang David Li" > <davidxl at google.com> > Sent: Tuesday, November 1, 2016 8:24:30 PM > Subject: Re: [llvm-dev] (RFC) Encoding code duplication factor in
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
2016 Nov 02
3
(RFC) Encoding code duplication factor in discriminator
----- Original Message ----- > From: "Dehao Chen" <dehao at google.com> > To: "Hal Finkel" <hfinkel at anl.gov> > Cc: "llvm-dev" <llvm-dev at lists.llvm.org>, "Xinliang David Li" > <davidxl at google.com> > Sent: Tuesday, November 1, 2016 6:41:29 PM > Subject: Re: [llvm-dev] (RFC) Encoding code duplication factor in
2018 Dec 29
1
[RFC] Adding thread group semantics to LangRef (motivated by GPUs)
On 20.12.18 18:03, Connor Abbott wrote: > We already have the notion of "convergent" functions like > syncthreads(), to which we cannot add control-flow dependencies. > That is, it's legal to hoist syncthreads out of an "if", but it's > not legal to sink it into an "if".  It's not clear to me why we > can't have
2012 Jan 04
1
AR update / create pattern: is there an easier way?
I find myself writing the following frequently: r = MyActiveRecord.where(:attr1 => cond1, :attr2 => cond2, ...) r.exists? ? r.first : r.create ... which has the effect of returning an instance of MyActiveRecord if all the conditions are met, or creating one if it doesn''t. A variant of this: c = MyActiveRecord.new(:attr1 => val1, :attr2 => val2, ...) r =
2017 Jul 24
5
Ifelse statements and combining columns
Hi everyone, I'm having some trouble with my ifelse statements. I'm trying to put 12 conditions within 3 groups. Here is the code I have so far: dat$cond <- ifelse(test = dat$cond == "cond1" | dat$cond == "cond2" | dat$cond == "cond3" dat$cond == "cond4" yes = "Uniform" no = ifelse(test =