Wednesday, April 18, 2012

knitr Performance Report-Attempt 2

Over the years I have changed my learning process from reading thoroughly first before proceeding to reading minimally and then applying immediately.  I very quickly see the gaps in my knowledge.  This method is far more painful but seems to quicken progress up the learning curve.  You will definitely see the process in its entirety with this series on latex, knitr, and performance reporting.  For those who are still hesitating, jump right in with me and let me know your result.

As I experimented with Attempt 2, I could see from others sample .Rnw files that LyX can serve as the IDE for Sweave/knitr documents, and I thought this would be a more pleasant route.  However it was not, and I eventually reverted back to old-school manual coding.  This post from R, Ruby, and Finance talks about TeXnic Center as an IDE.  Maybe I will try it for attempt 3. I am still a long way from a useable result (any bets on how many attempts it takes?), but the report is definitely an improvement

In Attempt 2, I used the echo=FALSE option to not output the R code on the final pdf report.  However, the code is still all there for public view within the .Rnw file.

I just remembered that ttrTests offers a Latex output option. Just what I need--another distraction. Look for that in future posts.

R code from GIST:

4 comments:

  1. I agree, what about LyX? LyX + knitr is great!

    ReplyDelete
  2. I know a lot of people that prefer the manual approach because that is what they learned but I think you are misleading yourself on LyX with your approach of trying without reading. There aren't many carpenters still in business that use a hammer when you can use a nail gun.

    ReplyDelete
  3. LyX is incredible but for my purposes it did not quicken the process. As the document gets longer and more complicated, I think LyX shows its power. I don't know many carpenters that will pull out a nail gun to drive 3 nails, but I know almost all will use it when they need to drive 1,000.

    ReplyDelete