strange numeric output rmarkdown r

I'm having problems with numeric format in rmarkdown. Here's my sample code:

---
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`

Heres the output I get:

  Untitled
me

10/8/2017

here is the number: 1.111110^{4}

I want this output:

Untitled
me

10/8/2017

here is the number: 11111

simply replace num <- 11111 with num <- 11111L, i.e., specify num to be an integer.

0 Comment

NO COMMENTS

LEAVE A REPLY

Captcha image