Displaying 8 results from an estimated 8 matches for "lwaldron".
Did you mean:
waldron
2009 Feb 12
3
getting all pairwise combinations of elements in a character string
I'm able to do this as follows, but am wondering if anyone knows a
simpler way which still avoids explicit loops?
> (mystring <- letters[1:5])
[1] "a" "b" "c" "d" "e"
> unlist(sapply(mystring[-length(mystring)],
+ function(x)
paste(x,mystring[(grep(x,mystring)+1):length(mystring)],sep="")))
a1 a2 a3
2009 Aug 31
3
Two way joining vs heatmap
Hi
STATISTICA has a function called "Two-way joining" (see
http://www.statsoft.com/TEXTBOOK/stcluan.html#twotwo) and the
reference material states that this is based on the method as
published by Hartigan (found this paper:
http://www.jstor.org/pss/2284710 through wikipedia).
What is the relationship (if any) between the "heatmap" function in R
and this technique? Is there an
2014 Dec 31
1
Unexpected behavior of debug() in step-wise mode
Why does debug() enter Browse[3] here at all, and why does it happen the
first time and not the second? This seems unexpected to me, and has
undesirable effects for ESS users (that I reported here -
https://stat.ethz.ch/pipermail/ess-help/2013-June/009154.html - but just
realized my post to r-devel didn't make it through when I tried to report
it back then).
> Fun <- function(n)
2009 Apr 02
0
multiple annotations on a heatmap
Can someone recommend a more sophisticated way to annotate heatmaps than the
ColSideColors argument of heatmap and heatmap.2? In particular, I would
like to be able to annotate columns with more than one piece of information,
like in Figure 1 of the article at
http://www3.interscience.wiley.com/cgi-bin/fulltext/117905619/HTMLSTART /
doi:10.1002/hep.22256.
Some example data and a heatmap:
2009 Dec 16
1
difference between the meaning of MARGIN in sweep() and apply()
For example, subtracting 1:2 from the rows of a two-column matrix:
> t(apply(matrix(1:6,ncol=2),MARGIN=1,function(y) y - 1:2))
[,1] [,2]
[1,] 0 2
[2,] 1 3
[3,] 2 4
> sweep(matrix(1:6,ncol=2),MARGIN=2,1:2,FUN="-")
[,1] [,2]
[1,] 0 2
[2,] 1 3
[3,] 2 4
Is there a logic to this difference, or is it just a quirk of the history of
these
2009 Mar 17
1
breaking ties in order() based on many vectors
The order() function allows you to specify multiple vectors, which are used
successively to break ties. If I want to use many vectors to break ties
(say, 25 or more), that are columns of a matrix or elements of a list, does
anyone know a shortcut to do this without passing 25 arguments to order()?
--
Levi Waldron
post-doctoral fellow
Jurisica Lab, Ontario Cancer Institute
Division of Signaling
2011 Jul 01
1
highlighting clusters in a heatmap
I would like to draw horizontal or vertical lines on a heatmap to
highlight the clusters at some specified cut depth of the dendrogram.
As a hacked example, the following code would work if I could set the
coordinates of the top and bottom of the false color image correctly
(ymin and ymax), but the correct values seem to depend on the output
device and its size. I realize that heatmaps use a 2x2
2009 Aug 27
2
setting par(srt) according to plot aspect ratio
How can I look up the aspect ratio of a plot, so I can use that to correctly
adjust the angle of text which is supposed to be parallel to a line in the
plot?
The following example code works for a 1:1 aspect ratio, but puts the text
at the wrong angle if the plot region is short and wide or tall and narrow.
I can't find a par() component containing the plot aspect ratio. It will
be for