Skip to content

Instantly share code, notes, and snippets.

@raffdoc
Forked from timelyportfolio/knitr performance.r
Created April 12, 2012 20:51
Show Gist options
  • Save raffdoc/2370912 to your computer and use it in GitHub Desktop.
Save raffdoc/2370912 to your computer and use it in GitHub Desktop.
## title:First Attempt at a knitr Performance Report
## author:Timely Portfolio
require(PerformanceAnalytics)
require(xtable)
data(edhec)
table.CalendarReturns(edhec[,1:3])[13:15]
charts.PerformanceSummary(edhec[,1:3],
colorset=c("gray50","steelblue2","steelblue4"),
main="EDHEC Performance by Type")
require(knitr)
#use stitch to open and run the knitr performance.r script
# and then generate Rnw code
#knit2pdf converts the Rnw to a pdf
knit2pdf(stitch("knitr performance.r"))
@raffdoc
Copy link
Author

raffdoc commented Apr 12, 2012

Thanks for sharing, cool stuff, I have tried and it works perfectly for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment