yihui/knitr — pull request #563 by NickSalkowski (2013-07-01 18:50:39+00:00)
Title: My mistake!: Needs if then else, not ifelse -- otherwise only the first line of code is written.  

I messed up by using ifelse() when I should have used if then else. The old code just wrote the first line, not all the lines of code.