当前位置:网站首页>If you ask me about R code debugging, I will tell you head, STR, help
If you ask me about R code debugging, I will tell you head, STR, help
2022-07-07 04:50:00 【Mrrunsen】
RMardkown Your code can be more finely controlled when rendering , Such as whether the code is running 、 Whether or not shown 、 How to display 、 Whether the text is output 、 How to output 、 Whether the picture shows 、 How to display and so on .
Detailed information can be referred to Knitr Of Chunk options:https://yihui.org/knitr/options/. Here we mainly show the common format control based on personal experience .
I Code
eval
Whether to run code block , Some code blocks are not running , Just for display .
RMarkdown The code option for is to accept R Variable , Therefore, you can control whether a code block is executed according to specific conditions .
Below RMarkdown On behalf of isShow Is the result greater than 0 To decide whether to execute the second code block .
```{r,include = FASLE}
isShow <- rnorm(1) > 0
```
```{r, eval = isShow}
{eval some code}
```
echo
Whether to show the code block in the result , The code shown below indicates that it is not in the result file ( Such as html file ) Display code in , But it will show the results of the code : Text or pictures, etc .
```{r, echo = FALSE}{eval some code}```
tidy
Whether to format when displaying code , If TRUE, Then you can use formatR format R Code : transfer
边栏推荐
- 日常工作中程序员最讨厌哪些工作事项?
- A row of code r shows the table of Cox regression model
- Implementation of JSTL custom function library
- Network Security Learning - Information Collection
- Field data acquisition and edge calculation scheme of CNC machine tools
- AI 落地新题型 RPA + AI =?
- Section 1: (3) logic chip process substrate selection
- 当 Knative 遇见 WebAssembly
- Fiance donated 500million dollars to female PI, so that she didn't need to apply for projects, recruited 150 scientists, and did scientific research at ease!
- 浙江大学周亚金:“又破又立”的顶尖安全学者,好奇心驱动的行动派
猜你喜欢

In depth analysis of kubebuilder

How to open win11 remote desktop connection? Five methods of win11 Remote Desktop Connection

Win11截图键无法使用怎么办?Win11截图键无法使用的解决方法
![A detailed explanation of head pose estimation [collect good articles]](/img/22/7ae0b12c3d945b449bcc8bb4a8961b.jpg)
A detailed explanation of head pose estimation [collect good articles]

Lessons and thoughts of the first SQL injection

图灵诞辰110周年,智能机器预言成真了吗?

A row of code r shows the table of Cox regression model

mpf2_ Linear programming_ CAPM_ sharpe_ Arbitrage Pricin_ Inversion Gauss Jordan_ Statsmodel_ Pulp_ pLU_ Cholesky_ QR_ Jacobi

Oracle -- 视图与序列

On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?
随机推荐
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?
C # use Siemens S7 protocol to read and write PLC DB block
Fix the problem that the highlight effect of the main menu disappears when the easycvr Video Square is clicked and played
深入解析Kubebuilder
R语言主成分pca、因子分析、聚类对地区经济研究分析重庆市经济指标
两个div在同一行,两个div不换行「建议收藏」
Introduction to the PureMVC series
日常工作中程序员最讨厌哪些工作事项?
窗口可不是什么便宜的东西
Win11 control panel shortcut key win11 multiple methods to open the control panel
The easycvr platform is connected to the RTMP protocol, and the interface call prompts how to solve the error of obtaining video recording?
What if win11 pictures cannot be opened? Repair method of win11 unable to open pictures
Common methods of list and map
Code source de la fonction [analogique numérique] MATLAB allcycles () (non disponible avant 2021a)
Canteen user dish relationship system (C language course design)
Have you got the same "artifact" of cross architecture development praised by various industry leaders?
Jetson nano配置pytorch深度学习环境//待完善
Basic idea of counting and sorting
How to open win11 remote desktop connection? Five methods of win11 Remote Desktop Connection
jvm是什么?jvm调优有哪些目的?