[R] Bwplot with dendrogram to indicate significant differences

2011-02-10 Thread Michael Hoffman
I would like to make a box plot with a dendogram on top that can be used to indicate significant differences (with an asterisk or three at a node depending on the p-value). I can supply the adjacency information a priori. Is there an easy way to do this? Other ways of presenting the same inform

[R] Getting Stangle to tangle Sexpr expressions

2008-02-26 Thread Michael Hoffman
Is there a way to get Stangle to print out Sexpr expressions as well as code chunks? I am using weaver and when trying to debug Sweave files, it is sometimes difficult to figure out where the error is. The errors are hardest to find when they are in Sexpr expressions because stepping through th

Re: [R] rapply on a data.frame

2008-02-24 Thread Michael Hoffman
Michael Hoffman wrote: > Is it possible to get something like rapply for a data.frame? On second thought, I can do something like this: happly <- function(x, fun) { if (class(x) == "list") { lapply(x, happly, fun) } else { fun(x) } } > happly(list(a=list(

[R] rapply on a data.frame

2008-02-24 Thread Michael Hoffman
Is it possible to get something like rapply for a data.frame? For example, if I do this: > x <- list(a=mtcars, b=mtcars) > str(rapply(x, nrow, classes="data.frame", how="replace")) List of 2 $ a:List of 11 ..$ mpg : num [1:32] 21 21 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 ... ..$ cyl :

[R] Automatically discovering dependencies in Sweave

2008-02-20 Thread Michael Hoffman
I am using Sweave in a Makefile-managed LaTeX project. I regenerate the .tex files automatically when there are changes in the Rnw files, but this also needs to be done when files that are sourced using source() are changed. Is there something that can be done using codetools to discover all th

Re: [R] Automatic traceback

2008-01-16 Thread Michael Hoffman
Prof Brian Ripley wrote: > On Wed, 16 Jan 2008, Michael Hoffman wrote: > >> I would like to have an automatic traceback printed on error. Is there >> a way to do this? > > There is a compact traceback printed automatically in non-interactive use, > and you can tu

[R] Automatic traceback

2008-01-16 Thread Michael Hoffman
raceback) > stop("1") Error: 1 No traceback available > stop("2") Error: 2 1: stop("1") > stop("3") Error: 3 1: stop("2") I am using R version 2.6.0 (2007-10-03). -- Michael Hoffman __ R-help@r-pr

Re: [R] Java parser for R data file?

2007-12-05 Thread Michael Hoffman
David Coppit wrote: > Hi everyone, > > Has anyone written a parser in Java for either the ASCII or binary format > produced by save()? You might want to consider using the hdf5 package to save the array in HDF5 format. There are HDF5 libraries for Java as well

Re: [R] Sweave: Variables in code chunk headers

2007-12-01 Thread Michael Hoffman
Dieter Menne wrote: > Michael Hoffman sneakemail.com> writes: > >> I would like to be able to do something like this: >> >><>= >>... >>@ >> >> with mywidth set in a previous code chunk. Is there a way to do this in >> Sw

[R] Sweave: Variables in code chunk headers

2007-12-01 Thread Michael Hoffman
I would like to be able to do something like this: <>= ... @ with mywidth set in a previous code chunk. Is there a way to do this in Sweave? (Sorry for two questions in a row, I have been saving these up.) -- Michael __ R-help@r-project.org

[R] Spellchecking Sweave documents

2007-12-01 Thread Michael Hoffman
I have been using Aspell on a Linux system, but it doesn't understand the noweb chunks, which I'd rather it not spellcheck. I can run it on the generated .tex files, but then changes I make during the spellcheck will not be propagated back to the original source. Any suggestions on how to spellchec