knitr - Object not found while knitting in R Studio -


i trying knit using r studio keep getting error

error in summary(diamonds) : object 'diamonds' not found calls: ... withcallinghandlers -> withvisible -> eval -> eval -> summary execution halted

this code,

```{r}    summary(diamonds) ``` 

while run above code works fine when try knit says object not found. although when use cars datset, don't have such problems. understand diamonds dataset part of ggplot2 package , have installed package well.

i have gone through suggestions use

knit2html('filename.rmd') knit('filename.rmd') 

i have tried

```{r include = true}    summary(diamonds) ``` 

you need load package inside code chunk before knitting it.

```{r}     library(ggplot2)    summary(diamonds)  ``` 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -