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

2013-08-03 Thread Robin Cura
, minimal, self-contained, reproducible code. -- Robin Cura Ingénieur d'Étude à l'UMR Géographie-cités http://www.parisgeo.cnrs.fr ANR TransMonDyn http://www.transmondyn.parisgeo.cnrs.fr [[alternative HTML version deleted]] __ R-help@r

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 aa2e...@yahoo.co.uk 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
...@gmail.com Hi robin, 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, Dec 12, 2011 at 5:15 PM, Robin Cura

[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

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 fabrice.c...@gmail.com 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

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

2011-09-16 Thread Robin Cura
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 des classes, xlab=Classes, ylab=Dissimilarité, sub= , labels=FALSE