.rda object not recognized in R vignette

I am creating an R package and have a graph.rda file inside my data folder.

In RStudio, in the .rmd vignette file, I read the data in:

data(graph)
head(graph)

but when I "Knit HTML" file vignette.rmd, I get an error message in these two lines:

"Error in head(sbTree): object 'sbTree' not found Calls: 
 <Anonymous> ... withCallingHandlers -> withVisible -> 
 eval -> eval -> head Execution halted"

I tried to study the solutions and tried some of the suggestions (for example, add a library (knitr)), but to no avail.

Any advice is appreciated!

+4
source share

All Articles