当前位置:网站首页>A simple and beautiful regression table is produced in one line of code~
A simple and beautiful regression table is produced in one line of code~
2022-07-07 04:50:00 【Mrrunsen】
After establishing the regression model , The next step is to tabulate the results , Then report or publish .
Usually , You need to manually compare the parameters with p Value, etc. excerpt to word. But sometimes you also need to make a list quickly , So that it can be directly pasted to ppt Zhongbao , Or export and publish it as a picture in the paper .
Although in previous articles ( See end of article ) Similar topics have been introduced , But the code recommended today is simpler , The forms produced are not inferior
.
Install and load now R package :
install.packages("flextable")
library(flextable)
summary(mtcars)
next step , Establish regression equation , Will use mpg As a dependent variable ,vs, hp, wt As an independent variable , And add all the interaction items between them :
mymodel <- lm(mpg ~ vs * hp * wt, data = mtcars)
summary(mymodel)
Okay , Now you can copy the value
边栏推荐
- Comment les tests de logiciels sont - ils effectués sur le site Web? Testez la stratégie!
- 树与图的深度优先遍历模版原理
- AI landing new question type RPA + AI =?
- How does vscade use the built-in browser?
- Is there any way to bookmark the code in the visual studio project- Is there a way to bookmark code in a Visual Studio project?
- Digital chemical plant management system based on Virtual Simulation Technology
- mpf2_ Linear programming_ CAPM_ sharpe_ Arbitrage Pricin_ Inversion Gauss Jordan_ Statsmodel_ Pulp_ pLU_ Cholesky_ QR_ Jacobi
- What if win11 pictures cannot be opened? Repair method of win11 unable to open pictures
- 【数模】Matlab allcycles()函数的源代码(2021a之前版本没有)
- Two divs are on the same line, and the two divs do not wrap "recommended collection"
猜你喜欢
这项15年前的「超前」技术设计,让CPU在AI推理中大放光彩
[hand torn STL] list
[team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp
Win11图片打不开怎么办?Win11无法打开图片的修复方法
The request request is encapsulated in uni app, which is easy to understand
【736. Lisp 语法解析】
The easycvr platform is connected to the RTMP protocol, and the interface call prompts how to solve the error of obtaining video recording?
On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?
Introduction to namespace Basics
九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!
随机推荐
Is there any way to bookmark the code in the visual studio project- Is there a way to bookmark code in a Visual Studio project?
Leetcode notes
MySQL split method usage
The easycvr platform is connected to the RTMP protocol, and the interface call prompts how to solve the error of obtaining video recording?
SQL where multiple field filtering
A line of R code draws the population pyramid
Gpt-3 is a peer review online when it has been submitted for its own research
Both primary and secondary equipment numbers are 0
sscanf,sscanf_s及其相关使用方法「建议收藏」
Meow, come, come: do you really know if, if else
leetcode 53. Maximum Subarray 最大子数组和(中等)
Common methods of list and map
How does vscade use the built-in browser?
ACL2022 | 分解的元学习小样本命名实体识别
Easycvr cannot be played using webrtc. How to solve it?
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
In depth analysis of kubebuilder
Programmers go to work fishing, so play high-end!
Meaning of 'n:m' and '1:n' in database design
Digital chemical plants realize the coexistence of advantages of high quality, low cost and fast efficiency