write.latextable: Write Latex Table

View source: R/auxiliary.R

write.latextableR Documentation

Write Latex Table

Description

Write Latex Table

Usage

write.latextable(
  x,
  d = NA,
  s = NA,
  se = NULL,
  se.d = NA,
  se.s = NA,
  se.format = "X_{(SE)}",
  no.rounding = numeric(),
  file = ""
)

Arguments

x

dataframe to be converted into a latex table

d

if specified, all floats will be rounded to d decimal places

s

if specified (and d is unspecified), then all floats will be rounded to s signif

se

a dataframe of standard errors, need not be the same dimension as x, columns of x and se will be matched by column names

se.d

same as d, but for dataframe se

se.s

same as s, but for dataframe se

se.format

how values and standard errors are combined, use X as a placeholder for the numeric value, and SE as a placeholder for the standard error in the latex formula.

no.rounding

column indices not to apply rounding

file

filename for output, default to screen output

Examples

df <- data.frame(name=c('Alpha', 'Beta', 'Gamma', 'Delta'),
                 size=c(100L,200L,300L,400L), score=c(23.091,19.978,1119.229, 0.03089))
write.latextable(df, s=3)

wangtengyao/putils documentation built on Nov. 26, 2024, 2:01 a.m.