Skip to content

knitr package error.

2 messages · Shadrack Magut, Jeff Newmiller

#
hello, someone help me sort out this error "## Error in summary(data):
object ?analysis? not found"" in using Knitr package in R. I imported the
data into R studio but as soon as i use any code involving the data i
imported in the Knitr environment within the latex document i encounter the
above error.Kindly help me sort out this error.

Attached to this mail is a word document containing the screenshot of my R
codes and output error.

Regards
shadrack.?
#
The mailing list allows very few types of attachments through to limit virus problems. You need to learn how to convey your problem as a reproducible sequence of R statements to get clear assistance here. [1]

In this case,  you may be confused between the interactive working environment (variables) and the environment set up by knitr for generating the TeX document. You need to put every statement that is needed to create your variables in the knitr document, directly or by using the source or library functions. Variables you create interactively are not available to knitr. This is a key step to making your documents reproducible, much like your example code you should be sending here with your questions. 

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example