亚洲精品久久久久久第一页-人妻少妇精彩视品一区二区三区-91国产自拍免费视频-免费一级a在线播放视频正片-少妇天天日天天射天天爽-国产大屁股喷水视频在线观看-操美女骚穴抽插性爱视频-亚洲 欧美 中文字幕 丝袜-成人免费无码片在线观看

萬能轉(zhuǎn)換:R圖和統(tǒng)計(jì)表轉(zhuǎn)成發(fā)表級(jí)的Word、PPT、Excel、HTML( 四 )

# Create a file namefilen <- "table_aov" # or# filen <- paste("YOUR_DIR/table_aov")# Generate ANOVA outputfit=aov(yield ~ block + N * P + K, data = https://www.520longzhigu.com/shenghuo/npk) #'npk' dataset from base 'datasets'x=summary(fit)# Save ANOVA table as a CSV### Option 1: pass output as object# 輸出對象table2csv(x=x,file=filen, digits = 1, digitspvals = 3, add.rownames=TRUE)# 屏幕輸出導(dǎo)出到文件### Option 2: get output from consolesummary(fit)table2csv(file=filen, digits = 2, digitspvals = 4, add.rownames=TRUE)# Save ANOVA table as an Excel# Without formatting of the worksheetxtable2excel(file=filen, sheetName="aov_noformatting", digits = 1, digitspvals = 3, add.rownames=TRUE)# 更多參數(shù)# With formatting of the worksheettable2excel(x=x,file=filen, sheetName="aov_formated", append = TRUE, add.rownames=TRUE, fontName="Arial", fontSize = 14, fontColour = rgb(0.15,0.3,0.75), border=c("top", "bottom"), fgFill = rgb(0.9,0.9,0.9), halign = "center", valign = "center", textDecoration="italic")
原始數(shù)據(jù)的表格:
轉(zhuǎn)換格式之后的,在console中的數(shù)據(jù):


文件(csv和excel)中表格數(shù)據(jù):
導(dǎo)出為Word中的表,再也不用復(fù)制粘貼調(diào)格式了 table2officetable2ppt: 導(dǎo)出統(tǒng)計(jì)輸出到Microsoft Office PowerPoint/ LibreOffice Impress演示文稿中的表
table2doc: 將統(tǒng)計(jì)輸出導(dǎo)出到Microsoft Office Word/ LibreOffice Writer文檔中的表
table2office(x = NULL, file = "Rtable", type = c("PPT", "DOC"),append = FALSE, digits = 2, digitspvals = 2, trim.pval = TRUE,width = NULL, height = NULL, offx = 1, offy = 1,font = ifelse(Sys.info()["sysname"] == "Windows", "Arial","Helvetica")[[1]], pointsize = 12, add.rownames = FALSE)
# Create a file namefilen <- "table_aov"# filen <- paste("YOUR_DIR/table_aov")# Generate ANOVA outputfit=aov(yield ~ block + N * P + K, data = https://www.520longzhigu.com/shenghuo/npk) #'npk' dataset from base 'datasets'# Save ANOVA table as a PPT### Option 1: pass output as objectx=summary(fit)table2ppt(x=x,file=filen, digits = 1, digitspvals = 3, add.rownames =TRUE)### Option 2: get output from consolesummary(fit)table2ppt(x=x,file=filen, width=5, font="Times New Roman", pointsize=14, digits=4, digitspvals=1, append=TRUE, add.rownames =TRUE) # append table to previous slide# Save ANOVA table as a DOC filetable2doc(x=x,file=filen, digits = 1, digitspvals = 3, add.rownames =TRUE)summary(fit)table2doc(file=filen, width=3.5, font="Times New Roman", pointsize=14, digits=4, digitspvals=1, append=TRUE, add.rownames =TRUE) # append table at end of document
將表格數(shù)據(jù)導(dǎo)出到ppt和word中:
table2textable2html: 導(dǎo)出統(tǒng)計(jì)輸出到HTML表 。
table2tex(x = NULL, file = "Rtable", type = "TEX", digits = 2,digitspvals = 2, trim.pval = TRUE, summary = FALSE, standAlone = TRUE,add.rownames = FALSE, ...)
summary:是否匯總數(shù)據(jù)文件 。
standAlone:導(dǎo)出的Latex代碼應(yīng)該是獨(dú)立可編譯的,還是應(yīng)該粘貼到另一個(gè)文檔中 。
add.rownames:是否應(yīng)該將行名添加到表中(在第一列之前插入一列) 。
# Create a file namefilen <- tempfile(pattern = "table_aov") # or# filen <- paste("YOUR_DIR/table_aov")# Generate ANOVA outputfit=aov(yield ~ block + N * P + K, data = https://www.520longzhigu.com/shenghuo/npk) #'npk' dataset from base 'datasets'x=summary(fit)# Export to Latex in standAlone formattable2tex(x=x,file=filen,add.rownames = TRUE)# Export to Latex to paste in tex documentsummary(fit) # get output from the consoletable2tex(file=filen, standAlone = FALSE,add.rownames = TRUE)# Export to HTMLtable2html(x=x,file=filen) # orsummary(fit) # get output from the consoletable2html(file=filen,add.rownames = TRUE)
導(dǎo)出到html或tex中的表格數(shù)據(jù):


R統(tǒng)計(jì)和作圖