当前位置:网站首页>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
边栏推荐
- 深入解析Kubebuilder
- Kivy tutorial of setting the size and background of the form (tutorial includes source code)
- 案例大赏:英特尔携众多合作伙伴推动多领域AI产业创新发展
- What is JVM? What are the purposes of JVM tuning?
- Two methods of chromosome coordinate sequencing
- 九章云极DataCanvas公司蝉联中国机器学习平台市场TOP 3
- ESG Global Leaders Summit | Intel Wang Rui: coping with global climate challenges with the power of science and technology
- 当 Knative 遇见 WebAssembly
- Mathematical analysis_ Notes_ Chapter 10: integral with parameters
- npm ERR! 400 Bad Request - PUT xxx - “devDependencies“ dep “xx“ is not a valid dependency name
猜你喜欢
【实践出真理】import和require的引入方式真的和网上说的一样吗
案例大赏:英特尔携众多合作伙伴推动多领域AI产业创新发展
[team learning] [34 sessions] Alibaba cloud Tianchi online programming training camp
The root file system of buildreoot prompts "depmod:applt not found"
Section 1: (3) logic chip process substrate selection
程序员上班摸鱼,这么玩才高端!
Introduction to namespace Basics
计数排序基础思路
窗口可不是什么便宜的东西
【线段树实战】最近的请求次数 + 区域和检索 - 数组可修改+我的日程安排表Ⅰ/Ⅲ
随机推荐
Field data acquisition and edge calculation scheme of CNC machine tools
Programmers go to work fishing, so play high-end!
[practice leads to truth] is the introduction of import and require really the same as what is said on the Internet
acwing 843. N-queen problem
Introduction to namespace Basics
What if win11 pictures cannot be opened? Repair method of win11 unable to open pictures
Complimentary tickets quick grab | industry bigwigs talk about the quality and efficiency of software qecon conference is coming
What about the collapse of win11 playing pubg? Solution to win11 Jedi survival crash
Two divs are on the same line, and the two divs do not wrap "recommended collection"
这项15年前的「超前」技术设计,让CPU在AI推理中大放光彩
Meaning of 'n:m' and '1:n' in database design
Fix the problem that the highlight effect of the main menu disappears when the easycvr Video Square is clicked and played
Local tool [Navicat] connects to remote [MySQL] operation
Advertising attribution: how to measure the value of buying volume?
MySQL forgot how to change the password
英特尔与信步科技共同打造机器视觉开发套件,协力推动工业智能化转型
Code source de la fonction [analogique numérique] MATLAB allcycles () (non disponible avant 2021a)
【736. Lisp 语法解析】
Have you got the same "artifact" of cross architecture development praised by various industry leaders?
九章云极DataCanvas公司蝉联中国机器学习平台市场TOP 3