Skip to content

Hmisc/Design and problem with cgroup

6 messages · Aric Gregson, Frank E Harrell Jr, Uwe Ligges

#
Hello,

I am trying to use the following to output a table to latex:

cohortbyagesummary <- by(data.frame(age,ethnicity), cohort, summary) 

w <- latex.default(cohortbyagesummary, 
    caption="Five Number Age Summaries by Cohort",
    label="agesummarybycohort", 
    cgroup=c('hello','goodbye','hello'),
    colheads=c("Age","Ethnicity"),
    extracolheads=c('hello','goodbye'), # demonstration of subheadings
    greek=TRUE,
    ctable=TRUE)
    
I am not able to get the major column headings of cgroup to work. I
receive the error:
    Object cline not found
    
I do not see in the examples or documentation that you must specify
cline or anything. 

Any suggestions? Thanks very much,

aric

R 2.0.1
Design 2.0-11
Hmisc  3.0-5
OS X 10.3.9
#
Aric Gregson wrote:
See if a modified version at
http://biostat.mc.vanderbilt.edu/cgi-bin/cvsweb.cgi/Hmisc/R/latex.s
fixes your problem.

You don't need .default after latex.

Frank
4 days later
#
On 5/17/05 21:44 Frank E Harrell Jr sent the following:
Dr. Harrell,

Thanks for your help. I have downloaded latex.s, but am unable to figure
out where it should go. How do I ensure that it is called when I load
Hmisc? Do I patch it against R/Hmisc?

I have a local directory structure in ~/Library/R/library/Hmisc/:

-rw-r--r--  1 user  user  594 12 May 19:20 CITATION
-rw-r--r--  1 user  user  989 12 May 19:20 DESCRIPTION
drwxr-xr-x  3 user  user  102 12 May 19:20 Meta/package.rds
drwxr-xr-x  3 user  user  102 12 May 19:20 R/Hmisc
drwxr-xr-x  3 user  user  102 12 May 19:20 libs/Hmisc.so

Thanks for your patience.

aric
#
Aric Gregson wrote:
Your directory structure is from an installed binary package. You need 
to replace the file in the *source* package and *install* the source 
package after that.

Uwe Ligges
#
Uwe Ligges wrote:
A better approach is just to source( ) in the new version after 
library(Hmisc) is issued.  You can put latex.s anywhere, just put that 
path in the source( ).  A new version of Hmisc will include the fix.

Frank

  
    
1 day later
#
Frank E Harrell Jr wrote:

            
Please note that this does now work generally if a NAMESPACE is involved 
(which seems not to be the case here).

Uwe