Skip to content

Commit

Permalink
tests/latex.r: more tests, for feeding into html conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Harrell committed May 17, 2016
1 parent 1cedc3b commit cd4fd0a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/latex.r
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@ x <- runif(100)
y <- abs(x - 0.5) + runif(100)
f <- ols(y ~ rcs(x, 5))
latex(f, file='')



require(rms)
x1 <- runif(200); x2 <- runif(200)
y <- sample(0:1, 200, TRUE)
f <- lrm(y ~ rcs(x1) + rcs(x2))
cat('\\documentclass{article}\\begin{document}\\usepackage{longtable}\n', file='/tmp/e.tex')
lat <- latex(f, file='/tmp/e.tex', append=TRUE)
sink('/tmp/e.tex', append=TRUE)
print(f, latex=TRUE)
sink()
cat('\\end{document}\n', file='/tmp/e.tex', append=TRUE)

0 comments on commit cd4fd0a

Please sign in to comment.