Re: [R] knittr: non-numeric argument to binary operator

2015-04-26 Thread Mark Drummond
Thanks all for the responses. As Murphy would have it, after posting my query I found the problem. I had a function defined that did some value mapping and I had a stray line of code in the function. Actually a legitimate line of code that was just in the wrong place. Cheers, Mark On Sun, Apr 26

Re: [R] knittr: non-numeric argument to binary operator

2015-04-26 Thread Milt Epstein
I was getting pretty much the same error recently, when I joined this list (I'm new to R), and the solution turned out to be that I needed to call as.integer() on a certain value, before passing it to a function. In my case it was a value read/returned from commandArgs(), but I suppose there are o

Re: [R] knittr: non-numeric argument to binary operator

2015-04-26 Thread John Kane
We need some idea of what you were actually doing (i.e code, data, ... ) See http://adv-r.had.co.nz/Reproducibility.html for some suggestions. John Kane Kingston ON Canada > -Original Message- > From: m...@markdrummond.ca > Sent: Sun, 26 Apr 2015 16:41:32 -0400 > To: r-h...@stat.math.eth

Re: [R] knittr: non-numeric argument to binary operator

2015-04-26 Thread Jeff Newmiller
Not reproducible [1], so any response likely to be a guess. However, you likely have not put everything that is in your interactive environment into the knitr document, so you are not working with the same data in those two environments. [1] http://stackoverflow.com/questions/5963269/how-to-mak