Re: [R] How to create a dendrogram with colored branches

2013-08-03 Thread Robin Cura
at.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Robin Cura Ingénieur d'Étude à l'UMR Géogr

Re: [R] Executable expressions

2012-01-18 Thread Robin Cura
Hi eval(parse(text=a)) should do the trick :) Cheers, Robin 2012/1/18 Ajay Askoolum > Given > > a<-"c(1,2,3,4,5)" > > How can I evaluate the variable a to return a (numeric) vector comprising > of 1,2,3,4,5? Thanks. > >[[alternative HTML version deleted]] > > > __

Re: [R] Improve a browse through list items - Transform a loop to apply-able function.

2011-12-16 Thread Robin Cura
gt; I'm not sure is what you need, but that's an esthetically nice > solution (one single line without any loop :) ) > > > matrix(apply(log(cbind(as.numeric(a),as.numeric(b),as.numeric(c),as.numeric(d))),1,sd),3) > > hope it could help, > > PF > > > On Mon,

[R] Improve a browse through list items - Transform a loop to apply-able function.

2011-12-12 Thread Robin Cura
Hello, I'm currently trying to convert a slow and ugly script I made, so that it's faster and can be computed on a computer grid with the multicore package. My problem is that I don't see how to turn some loops into an "apply-able" function. Here's an example of my loops : I got a list of datafra

Re: [R] How can I check a package is installed or not?

2011-09-27 Thread Robin Cura
Hi I'm using this :) if (is.element('DESeq', installed.packages()[,1]) == FALSE) { install.packages('DESeq') } Robin 2011/9/27 Fabrice Tourre > Dear list, > > How can I detect a package is installed or not? If not, then install it. > > For example, in a script, I want to check the package DES

[R] Rect.hclust problem - "which=" not working

2011-09-16 Thread Robin Cura
obably isn't any random thing here afterall. Any guess ? Any idea how I could, in my script, got my boxes colored in the right order given in my which parameter ? Thanks, Robin Cura PS : A part of my code : par(mfrow=c(1,2), oma=c(2,2,2,2)) plot(hang = 0.2,mydata.cah, main="Arbre de