当前位置:网站首页>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
边栏推荐
- AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
- Field data acquisition and edge calculation scheme of CNC machine tools
- 关于01背包个人的一些理解
- 《原动力 x 云原生正发声 降本增效大讲堂》第三讲——Kubernetes 集群利用率提升实践
- A row of code r shows the table of Cox regression model
- You can't sell the used lithography machine to China! The United States unreasonably pressured the Dutch ASML, and domestic chips were suppressed again
- [line segment tree practice] recent requests + area and retrieval - array modifiable + my schedule I / III
- acwing 843. n-皇后问题
- 軟件測試之網站測試如何進行?測試小攻略走起!
- Chapter 9 Yunji datacanvas company won the highest honor of the "fifth digital finance innovation competition"!
猜你喜欢
深入解析Kubebuilder
Mathematical analysis_ Notes_ Chapter 10: integral with parameters
DFS和BFS概念及实践+acwing 842 排列数字(dfs) +acwing 844. 走迷宫(bfs)
Intel and Xinbu technology jointly build a machine vision development kit to jointly promote the transformation of industrial intelligence
程序员上班摸鱼,这么玩才高端!
Vscode automatically adds a semicolon and jumps to the next line
【线段树实战】最近的请求次数 + 区域和检索 - 数组可修改+我的日程安排表Ⅰ/Ⅲ
AI landing new question type RPA + AI =?
MySQL数据库(基础篇)
[team learning] [34 sessions] Alibaba cloud Tianchi online programming training camp
随机推荐
You can't sell the used lithography machine to China! The United States unreasonably pressured the Dutch ASML, and domestic chips were suppressed again
[digital analog] source code of MATLAB allcycles() function (not available before 2021a)
What if win11 pictures cannot be opened? Repair method of win11 unable to open pictures
Have you got the same "artifact" of cross architecture development praised by various industry leaders?
Win11图片打不开怎么办?Win11无法打开图片的修复方法
leetcode 53. Maximum subarray maximum subarray sum (medium)
AI landing new question type RPA + AI =?
acwing 843. n-皇后问题
Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
未婚夫捐5亿美元给女PI,让她不用申请项目,招150位科学家,安心做科研!
Nanopineo use development process record
Introduction to namespace Basics
namespace基础介绍
架构实战训练营|课后作业|模块 6
什么是Web3
What work items do programmers hate most in their daily work?
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
各路行业大佬称赞的跨架构开发“神器”,你get同款了吗?
Flex layout and usage