[R] Hmisc/Design and problem with cgroup

Frank E Harrell Jr f.harrell at vanderbilt.edu
Mon May 23 02:43:35 CEST 2005


Uwe Ligges wrote:
> Aric Gregson wrote:
> 
>> On 5/17/05 21:44 Frank E Harrell Jr sent the following:
>>
>>
>>> Aric Gregson wrote:
>>>
>>>> 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'),    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
>>>>
>>>
>>> See if a modified version at
>>> http://biostat.mc.vanderbilt.edu/cgi-bin/cvsweb.cgi/Hmisc/R/latex.s
>>> fixes your problem.
>>
>>
>>
>> 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.
> 
> 
> 
> 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

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

> 
>> aric
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide! 
>> http://www.R-project.org/posting-guide.html
> 
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 


-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University




More information about the R-help mailing list