[R] ctable error with Hmisc and Sweave (on a Mac)

Rolf Turner r.turner at auckland.ac.nz
Tue Mar 23 02:31:45 CET 2010


On 23/03/2010, at 12:35 PM, Clay Heaton wrote:

> Hi, pretty new with R and LaTeX here...
> 
> I'm trying to use the latex() function from the Hmisc table with Sweave. When I try:
> 
> pdflatex myfile.tex
> 
> I get an error that reads:
> 
> ! Undefined control sequence.
> l.22 \ctable
> 
> 
> It seems like this is an optional package for Tex that I haven't installed? My googling skills have neglected to locate instructions for how to install ctable on a Mac, though I've locate the ctable package. I reinstalled MacTex-2009 in hopes of solving the problem, but so far it hasn't helped.
> 
> Can anybody shed light on this error and how I might fix it?


What does

	locate ctable

(typed in a terminal window) give you?  I get (a whole load of stuff) and
      .
      .
      .
/usr/local/texlive/2008/texmf-dist/doc/latex/easy/doc.dvi/doctable.dvi
/usr/local/texlive/2008/texmf-dist/source/latex/ctable
/usr/local/texlive/2008/texmf-dist/source/latex/ctable/ctable.dtx
/usr/local/texlive/2008/texmf-dist/source/latex/ctable/ctable.ins
      .
      .
      .

Also does

	texdoc ctable

give any results?

If either of these commands gives a result, then you *have* ctable.  The reason
that pdflatex isn't finding it may relate to your tex search path (controlled by
the environment variable TEXINPUTS) --- but normally you should not need to set this.

	cheers,

		Rolf Turner
######################################################################
Attention: 
This e-mail message is privileged and confidential. If you are not the 
intended recipient please delete the message and notify the sender. 
Any views or opinions presented are solely those of the author.

This e-mail has been scanned and cleared by MailMarshal 
www.marshalsoftware.com
######################################################################



More information about the R-help mailing list