[R] Hmisc latex() does not want to work
John Kane
jrkrideau at yahoo.ca
Sun Jan 13 21:56:08 CET 2008
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.
>
More information about the R-help
mailing list