print_table | R Documentation |
This basic function prints any data frame as a three-line table
to either R Console or Microsoft Word (.doc).
It has been used in many other functions of bruceR
(see below).
print_table( x, digits = 3, nsmalls = digits, nspaces = 1, row.names = TRUE, col.names = TRUE, title = "", note = "", append = "", line = TRUE, file = NULL, file.align.head = "auto", file.align.text = "auto" )
x |
Matrix, data.frame (or data.table), or any model object (e.g., |
digits, nsmalls |
Numeric vector specifying the number of decimal places of output. Default is |
nspaces |
Number of whitespaces between columns. Default is |
row.names, col.names |
Print row/column names. Default is |
title |
Title text, which will be inserted in <p></p> (HTML code). |
note |
Note text, which will be inserted in <p></p> (HTML code). |
append |
Other contents, which will be appended in the end (HTML code). |
line |
Lines looks like true line ( |
file |
File name of MS Word ( |
file.align.head, file.align.text |
Alignment of table head or table text:
|
Invisibly return a list of data frame and HTML code.
These functions have implemented MS Word file output using this function:
Describe
Freq
Corr
EFA
/ PCA
CFA
TTEST
MANOVA
model_summary
med_summary
lavaan_summary
PROCESS
granger_test
granger_causality
print_table(data.frame(x=1)) print_table(airquality, file="airquality.doc") unlink("airquality.doc") # delete file for code check model = lm(Temp ~ Month + Day + Wind + Solar.R, data=airquality) print_table(model) print_table(model, file="model.doc") unlink("model.doc") # delete file for code check
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.