[R] How to convert array dim names to expressions for plotting?

2012-10-04 Thread Hofert Jan Marius
Hi, I would like to use the dim names of an array as labels in a plot. In the case of character labels, this is no problem. However, if I would like to pass expressions through array dim names, they only appear as character labels in the plot and are not evaluated as expressions (see the minima

Re: [R] How to convert array dim names to expressions for plotting?

2012-10-04 Thread Hofert Jan Marius
ewport(layout.pos.row=1, layout.pos.col=2)) grid.rect(gp=gpar(col=NA, fill="gray50")) grid.text(parse(text=dimnames(a)[["tau"]][2]), x=0.5, y=0.5) upViewport() From: Bert Gunter [gunter.ber...@gene.com] Sent: Thursday, October 04, 2012

Re: [R] How to efficiently compare each row in a matrix with each row in another matrix?

2012-12-08 Thread Hofert Jan Marius
1.4s system.time(bar <- Marius.2.0(A, B))[[3]] # ~ 1s stopifnot(all.equal(foo, bar)) From: tgstew...@gmail.com [tgstew...@gmail.com] on behalf of Thomas Stewart [tgs.public.m...@gmail.com] Sent: Saturday, December 08, 2012 3:46 PM To: Hofert Jan Marius Cc: ma

Re: [R] How to efficiently compare each row in a matrix with each row in another matrix?

2012-12-08 Thread Hofert Jan Marius
with C code called via .C: C was 15% faster. Cheers, Marius From: arun [smartpink...@yahoo.com] Sent: Saturday, December 08, 2012 7:43 PM To: Hofert Jan Marius Cc: Thomas Stewart; mailman, r-help Subject: Re: [R] How to efficiently compare each row

[R] Possible or not possible: serif axis labels with plotmath [but everything else sans serif]?

2011-09-19 Thread Hofert Jan Marius
Dear expeRts, I it possible to have serif labels in the following plot? x <- 1:10 y <- x plot(x, y, type="b", xlab=expression(x[1]), ylab=expression(x[2])) I know that one can use pdf(, family="serif"), but then also the axis tick marks are printed in serif font. Apart from the fact that it ma

Re: [R] Possible or not possible: serif axis labels with plotmath [but everything else sans serif]?

2011-09-19 Thread Hofert Jan Marius
arius On 2011-09-19, at 14:38 , Eik Vettorazzi wrote: > Hi Jan Marius, > using the tikzDevice-package, nearly everything is possible (at least, > all what can be done in LaTeX). > > cheers > > Am 19.09.2011 11:58, schrieb Hofert Jan Marius: >> Dear expeRts, >> &

[R] plot: how to fix the ratio of the plot box?

2011-10-02 Thread Hofert Jan Marius
Dear all, this should be trivial, but I couldn't figure out how to solve it... I would like to have a plot with fixed aspect ratio of 1. Whenever I resize the Quartz window, the axes are extended so that the plot fills the whole window. However, if you have different extensions for the differen

Re: [R] plot: how to fix the ratio of the plot box?

2011-10-02 Thread Hofert Jan Marius
ahh, perfect, thanks. Cheers, Marius On 2011-10-02, at 13:08 , Jim Lemon wrote: > On 10/02/2011 07:20 PM, Hofert Jan Marius wrote: >> Dear all, >> >> this should be trivial, but I couldn't figure out how to solve it... I would >> like to have a plot with fix