[Hmisc] proposal for change in latex.summary.formula.reverse (was: [R] Sweave: superfluous newline (`\\') in tex file)

Patrick Drechsler patrick.drechsler at gmx.net
Tue Sep 28 07:50:54 CEST 2004


Hi,

well, it wasn't a Sweave problem after all. Seems to have
something to do with the function
`latex.summary.formula.reverse' in the package Hmisc.

Following change seems to help (at least for my purpose):

--8<------------------------schnipp------------------------->8---
*** /usr/local/lib/R/library/Hmisc/R/Hmisc	2004-09-28 07:37:26.000000000 +0200
--- /usr/local/lib/R/library/Hmisc/R/Hmisc.original	2004-09-28 07:38:28.000000000 +0200
***************
*** 16156,16162 ****
                        'Numbers after percents are frequencies.',
                        sep="\n")
        if(length(testUsed))
!         legend <-paste(legend,'\n\n',
                         if(length(testUsed)==1)'Test used:' else 'Tests used:',
                         if(length(testUsed)==1) paste(testUsed,'test') else
                         paste(paste('$^{',1:length(testUsed),'}$',testUsed,
--- 16156,16162 ----
                        'Numbers after percents are frequencies.',
                        sep="\n")
        if(length(testUsed))
!         legend <-paste(legend,'\\\\\n','\n\n',
                         if(length(testUsed)==1)'Test used:' else 'Tests used:',
                         if(length(testUsed)==1) paste(testUsed,'test') else
                         paste(paste('$^{',1:length(testUsed),'}$',testUsed,
--8<------------------------schnapp------------------------->8---

But since my knowledge of R is rather small I have no idea if
these has any other drawbacks.

Any comments?

How would I go about changing this for my setup only? Is
renaming Hmisc to something like pdHmisc ok?

Patrick
-- 
Do you remember when you only had to pay
for windows when *you* broke them?




More information about the R-help mailing list