我在rmarkdown中遇到数字格式问题。这是我的示例代码:
---
title: "Untitled"
author: "me"
date: "10/8/2017"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
num <- 11111
```
here is the number: `r num`
继承我得到的输出:
Untitled
me
10/8/2017
here is the number: 1.111110^{4}
我想要这个输出:
Untitled
me
10/8/2017
here is the number: 11111
答案 0 :(得分:3)
只需将num <- 11111
替换为num <- 11111L
,即将num
指定为整数。