r - Rmarkdown hist() -


i'm trying knit rmd file html in rstudio, when hist() exit error: " ... withcallinghandlers -> withvisible -> eval -> eval -> hist". help highly appreciated.

the code similar this:

```{r} hist(diamonds$carat) ``` 

my session info:

r version 3.2.1 (2015-06-18),  platform: x86_64-w64-mingw32/x64 (64-bit) running under: windows 7 x64 (build 7601) service pack 1  locale: [1] lc_collate=russian_russia.1251  lc_ctype=russian_russia.1251    lc_monetary=russian_russia.1251 [4] lc_numeric=c                    lc_time=russian_russia.1251      attached base packages: [1] stats     graphics  grdevices utils     datasets  methods   base       other attached packages: [1] ggthemes_3.0.2 ggplot2_2.0.0  

rstudio (quite correctly) knits documents in clean session. hence, packages you’ve loaded in current session irrelevant.

now, diamonds example dataset comes ggplot2. if want use it, need load ggplot2 (or @ least dataset) inside rmarkdown document:

```{r} data(diamonds, package = 'ggplot2') ``` 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -