Creating a latex table from ftable object in R

前端 未结 5 584
面向向阳花
面向向阳花 2021-02-04 14:08

Let me create some data before I ask my question.

 my.data <- data.frame(A = sample(seq(1,100,by=5),10,replace=TRUE),W = rnorm(10),X =sample(1:10),Y = sample(         


        
5条回答
  •  不要未来只要你来
    2021-02-04 14:46

    You can use the package xtable:

    library(xtable)
    mytable=ftable(mydata)
    print(
      xtable(format(mytable)),file="~/Desktop/mytable.tex"
    )
    

    I don't know how it compares to the other options given.

提交回复
热议问题