From: John Kane <jrkrideau_at_yahoo.ca>

Date: Sun, 13 Jan 2008 15:56:08 -0500 (EST)

x <- matrix(1:6, nrow=2,

dimnames=list(c('a','b'),c('c','d','enLine 2'))) ## Not run:

latex(x) # creates x.tex in working directory w <- latex(x, file='/tmp/my.tex')

latex(x) gave an error

latex(x, file="") works fine.

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun 13 Jan 2008 - 21:02:51 GMT

Date: Sun, 13 Jan 2008 15:56:08 -0500 (EST)

Thank Frank,

I simply seem to have misread part of the first example

x <- matrix(1:6, nrow=2,

dimnames=list(c('a','b'),c('c','d','enLine 2'))) ## Not run:

latex(x) # creates x.tex in working directory w <- latex(x, file='/tmp/my.tex')

latex(x) gave an error

latex(x, file="") works fine.

- Frank E Harrell Jr <f.harrell_at_vanderbilt.edu> wrote:

> John Kane wrote:

*> > Works just fine, thanks. I'll blame the help as
**> > being very slightly ambiguous.
**>
**> From the help file:
**>
**> \section{Side Effects}{
**> creates various system files and runs various
**> Linux/UNIX system
**> commands which are assumed to be in the system path.
**> }
**>
**> \details{
**> If running under Windows and using MikTeX,
**> \code{latex} and \code{yap}
**> must be in your system path, and \code{yap} is
**> used to browse
**> \code{.dvi} files created by \code{latex}. You
**> should install the
**> \code{geometry} and \code{ctable} styles in
**> MikTeX to make optimum use
**> of \code{latex()}.
**>
**> Frank
**>
**>
**> >
**> > Of course another 2-3 minutes experimenting and I
**> > should have gotten it.
**> >
**> > --- Gabor Grothendieck <ggrothendieck_at_gmail.com>
**> > wrote:
**> >
**> >> Try specifying the file= argument:
**> >>
**> >> latex(rr, file = "")
**> >>
**> >> On Jan 13, 2008 1:05 PM, John Kane
*

> >>> I seem to have a problem getting latex (Hmisc)

*> to
**> >>> work.
**> >>> Any suggestions as to what I am doing wrong?
**> >>>
**> >>> Thanks
**> >>>
**> >>>
**> >>> library(Hmisc)
**> >>> aa <- data.frame(aa=1:10, bb=rnorm(10, 5, 2),
**> >>> cc=rnorm(10, 20, 4))
**> >>> rr <- lm(cc~aa+bb, data=aa); rr
**> >>> latex(rr)
**> >>>
**> >>>> latex(rr)
**> >>> 'latex' is not recognized as an internal or
**> >> external
**> >>> command,
**> >>> operable program or batch file.
**> >>> Warning messages:
**> >>> 1: In cbind(cx, cxk) :
**> >>> number of rows of result is not a multiple of
**> >> vector
**> >>> length (arg 2)
**> >>> 2: In cbind(cx, cxk) :
**> >>> number of rows of result is not a multiple of
**> >> vector
**> >>> length (arg 2)
**> >>> 3: In cbind(cx, cxk) :
**> >>> number of rows of result is not a multiple of
**> >> vector
**> >>> length (arg 2)
**> >>> 4: In cbind(cx, cxk) :
**> >>> number of rows of result is not a multiple of
**> >> vector
**> >>> length (arg 2)
**> >>> 5: In is.na(xj) :
**> >>> is.na() applied to non-(list or vector) of type
**> >>> 'language'
**> >>> 6: In is.na(xj) :
**> >>> is.na() applied to non-(list or vector) of type
**> >>> 'language'
**> >>> 7: In cbind(cx, cxk) :
**> >>> number of rows of result is not a multiple of
**> >> vector
**> >>> length (arg 2)
**> >>> 8: In cbind(cx, cxk) :
**> >>> number of rows of result is not a multiple of
**> >> vector
**> >>> length (arg 2)
**> >>> 9: In cbind(cx, cxk) :
**> >>> number of rows of result is not a multiple of
**> >> vector
**> >>> length (arg 2)
**> >>> 10: In shell(cmd, wait = TRUE, intern = output)
**> :
**> >>> 'cmd' execution failed with error code 1
**> >>>
**> >>>
**> >>> sessionInfo()
**> >>> R version 2.6.1 (2007-11-26)
**> >>> i386-pc-mingw32
**> >>>
**> >>> locale:
**> >>>
**> >
*

>

LC_COLLATE=English_Canada.1252;LC_CTYPE=English_Canada.1252;LC_MONETARY=English_Canada.1252;LC_NUMERIC=C;LC_TIME=English_Canada.1252

> >>> attached base packages:

*> >>> [1] stats graphics grDevices utils
**> >> datasets
**> >>> methods base
**> >>>
**> >>> other attached packages:
**> >>> [1] gdata_2.3.1 Hmisc_3.4-3
**> >>>
**> >>> loaded via a namespace (and not attached):
**> >>> [1] cluster_1.11.9 grid_2.6.1 gtools_2.4.0
**> >>> lattice_0.17-2
**> >>>
**> >>> ______________________________________________
**> >>> R-help_at_r-project.org mailing list
**> >>> https://stat.ethz.ch/mailman/listinfo/r-help
**> >>> PLEASE do read the posting guide
**> >> http://www.R-project.org/posting-guide.html
**> >>> and provide commented, minimal, self-contained,
**> >> reproducible code.
*

>

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun 13 Jan 2008 - 21:02:51 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Mon 14 Jan 2008 - 01:30:07 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*