0

I am using 'leaflet' package by R-studio to plot my geo-data. I am creating Rmarkdown file for the same.

Everything works fine. But I get following message in the beginning in Rmarkdown output file:

Assuming 'lng' and 'lat' are longitude and latitude, respectively

I have tried my best to suppress this message, but no success so far. It's not harmful but irritating!!! The code:

`{r, echo=FALSE, warning=FALSE} options(warn=-1) 
long = runif(40, -87, -80) 
lat = runif(40, 25, 42) 
m = leaflet() %>% addTiles() 
df = data.frame( lng=long, lat=lat,size = runif(40, 5, 20), color = sample(colors(), 40)) 
m = leaflet(df) %>% addTiles() 
m %>% addCircleMarkers(radius = runif(40, 4, 10), color = c('red','blue','green'))`
Mithilesh Kumar
  • 256
  • 1
  • 3
  • 18
  • Can you show us the code you are actually running? It's easier to help with a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). Be clear which functions you are using and what data you as passing in. – MrFlick Jul 21 '15 at 19:42
  • You should edit your original question to include the code rather than trying to stuff it in the comments. That way you can have proper formatting. – MrFlick Jul 21 '15 at 20:36
  • 1
    Thanks @MrFlick ! Just added the code there. – Mithilesh Kumar Jul 22 '15 at 05:30
  • 1
    Don't know why am I getting downvotes :( – Mithilesh Kumar Jul 22 '15 at 13:25

1 Answers1

2

You want the message option in the chunk header, e.g.

```{r, echo=FALSE, warning=FALSE, message=FALSE} 
Yihui Xie
  • 28,913
  • 23
  • 193
  • 419
EpiPete
  • 36
  • 1