I am using the xtable
to produce tex
output of a dataframe in R.3.3
. Is there a way to write the output to a file? When I use it I am only able to obtain tex
code in my R
console.
The print()
command for xtable
objects takes a file=
parameter to write to a file
library(xtable)
data(tli)
tli.table <- xtable(tli[1:20, ])
print(tli.table, file="table.txt")
see ?print.xtable
for all the options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With