Re: [R] merge table rows (\multirow)

2010-07-26 Thread Fabian Scheipl
You can also automate it with this: do.multirow<-function(df, which=1:ncol(df)){     for(c in which){         runs <- rle(as.character(df[,c]))         if(all(runs$lengths>1)){             tmp <- rep("", nrow(df))             tmp[c(1, 1+head(cumsum(runs$lengths),- 1))] <-                     paste

Re: [R] merge table rows (\multirow)

2010-07-26 Thread Fabian Scheipl
You can also automate it with this: do.multirow<-function(df, which=1:ncol(df)){ for(c in which){ runs <- rle(as.character(df[,c])) if(all(runs$lengths>1)){ tmp <- rep("", nrow(df)) tmp[c(1, 1+head(cumsum(runs$lengths),-1))] <- paste(

Re: [R] merge table rows (\multirow)

2009-01-12 Thread Felipe Carrillo
Thanks a lot Dieter, I'll play a little bit with it. Also thanks for the hint on how to post a latex reproducible example. --- On Mon, 1/12/09, Dieter Menne wrote: > From: Dieter Menne > Subject: Re: [R] merge table rows (\multirow) > To: r-help@r-project.org > Date: M

Re: [R] merge table rows (\multirow)

2009-01-12 Thread Gabor Grothendieck
and > over. I know this can be done with \multirow if the table is created > manually. Since this table is created dynamically on the fly I don't know how > to use \multirow like that. Hope is clear. Thanks > > > --- On Mon, 1/12/09, Dieter Menne wrote: &g

[R] merge table rows (\multirow)

2009-01-12 Thread Felipe Carrillo
e: > From: Dieter Menne > Subject: Re: [R] merge table rows (\multirow) > To: r-h...@stat.math.ethz.ch > Date: Monday, January 12, 2009, 12:41 AM > Felipe Carrillo yahoo.com> > writes: > > > I need help merging rows. > > I am trying to merge the 'M

Re: [R] merge table rows (\multirow)

2009-01-12 Thread Dieter Menne
Felipe Carrillo wrote: > > I am trying to merge the 'Month' column using \multirow. For example for > the column 'Week' I want July to be merged into one row(weeks 27,28,29,30) > and so on for the following weeks. > Below, I am creating a PDF using Sweave, MikTex,R-2.8.1 and windows XP to > sho

Re: [R] merge table rows (\multirow)

2009-01-12 Thread Dieter Menne
Felipe Carrillo yahoo.com> writes: > I need help merging rows. > I am trying to merge the 'Month' column using \multirow. For example for the column 'Week' I want July to be > merged into one row(weeks 27,28,29,30) and so on for the following weeks. > Below, I am creating a PDF using Sweave, MikT

[R] merge table rows (\multirow)

2009-01-11 Thread Felipe Carrillo
Hi: I need help merging rows. I am trying to merge the 'Month' column using \multirow. For example for the column 'Week' I want July to be merged into one row(weeks 27,28,29,30) and so on for the following weeks. Below, I am creating a PDF using Sweave, MikTex,R-2.8.1 and windows XP to show an e