When you compile an R-markdown document the code is run inside a "clean" R Session. That means it will not have access to objects in the workspace. The R-markdown document chunks will only have access to objects created in another chunk of the document, or the same chunk.
One way around this would be to write out the workspace to a binary file
save.image("myWorkSpace.RData")
before knitting, and then in the first chunk of your R-markdown document do
load("myWorkSpace.RData")
but I don't recommend it. Much better to include the code that creates the objects in your R-Markdown document. That means the document is entirely selfcontained, increasing reproducibility.