当前位置:网站首页>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
边栏推荐
- Win11图片打不开怎么办?Win11无法打开图片的修复方法
- Fix the problem that the highlight effect of the main menu disappears when the easycvr Video Square is clicked and played
- 赠票速抢|行业大咖纵论软件的质量与效能 QECon大会来啦
- [practice leads to truth] is the introduction of import and require really the same as what is said on the Internet
- sscanf,sscanf_ S and its related usage "suggested collection"
- Windows are not cheap things
- JS form get form & get form elements
- R language principal component PCA, factor analysis, clustering analysis of regional economy analysis of Chongqing Economic Indicators
- A series of shortcut keys for jetbrain pychar
- 【736. Lisp 语法解析】
猜你喜欢

深入解析Kubebuilder

On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?

树与图的深度优先遍历模版原理

Vscode automatically adds a semicolon and jumps to the next line

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

How does vscade use the built-in browser?

Vscode 如何使用内置浏览器?

深入解析Kubebuilder

Case reward: Intel brings many partners to promote the innovation and development of multi domain AI industry

Win11图片打不开怎么办?Win11无法打开图片的修复方法
随机推荐
[digital analog] source code of MATLAB allcycles() function (not available before 2021a)
Gpt-3 is a peer review online when it has been submitted for its own research
A line of R code draws the population pyramid
Zhou Yajin, a top safety scholar of Zhejiang University, is a curiosity driven activist
【线段树实战】最近的请求次数 + 区域和检索 - 数组可修改+我的日程安排表Ⅰ/Ⅲ
npm ERR! 400 Bad Request - PUT xxx - “devDependencies“ dep “xx“ is not a valid dependency name
【实践出真理】import和require的引入方式真的和网上说的一样吗
R language principal component PCA, factor analysis, clustering analysis of regional economy analysis of Chongqing Economic Indicators
Canteen user dish relationship system (C language course design)
MySQL forgot how to change the password
How to package the parsed Excel data into objects and write this object set into the database?
How to open win11 remote desktop connection? Five methods of win11 Remote Desktop Connection
Leetcode notes
C # use Siemens S7 protocol to read and write PLC DB block
jvm是什么?jvm调优有哪些目的?
Section 1: (3) logic chip process substrate selection
[hand torn STL] list
深入解析Kubebuilder
Jetson nano configures pytorch deep learning environment / / to be improved
Digital chemical plant management system based on Virtual Simulation Technology