Articles by klr

Overfitted Backtests

October 23, 2013 | klr

It has been a while since I discussed testing for overfitting in backtests.  Since then, Marcos López de Prado and coauthors have done some very thoughtful work (see the bottom), and they even started a blog.  Their newest paper builds on discoveries they made in their earlier work, and ... [Read more...]

R in Raw

October 8, 2013 | klr

This nice little tool Raw from DensityDesign transforms text from your clipboard to d3.  For those yearning to access Raw from R, here is an easy way to do it. Use this function read.excel from StatisticallySignificant’s post Copying Data from Excel to R and Back.  Once you run ... [Read more...]

rCharts goes Polar

October 8, 2013 | klr

The new micropolar library from Chris Viau, author of   gives us reusable charts with polar coordinates for d3.js.  In testament to rCharts design, Ramnath Vaidyanathan integrated micropolar with rCharts in less than 30 minutes.  I don’t use polar coordinates much, so I wrote this quick little comparison of Cartesian ... [Read more...]

Simplicity Explained by The Author

October 4, 2013 | klr

Source is usually best explained by the source.  Ramnath Vaidyanathan provides an excellent look under the hood in his tutorial on rCharts explaining how he integrates the new d3 library uvCharts. If you want to explore further, here is a list of... [Read more...]

Ode to Systematic Clusters

September 25, 2013 | klr

Extending the d3 remixes of the fine work at Systematic Investor, I thought it woud be fun to do some dimple.js and nvd3 scatterplots of clusters of PIMCO mutual funds.  As always, I welcome thoughts, comments, and suggestions.  Click here or... [Read more...]

d3-ify Systematic Investor Cluster Weight

September 9, 2013 | klr

I have posted before about the brilliant R/finance work being done at Systematic Investor.  I just had to see what his cluster work would look like with d3 interactivity.  Click on the screenshot below or here to see an interactive recreation... [Read more...]

Applications of Interactivity to Finance

August 28, 2013 | klr

Of the nearly infinite ways of using crossfilter and dc.js in finance, the 2 that immediately came to my mind are signal analysis in system building and money manager analysis in due diligence.  My first very basic experiment explores a commonly k... [Read more...]

Stocks and Bonds Behavior by Decade

August 13, 2013 | klr

I struggled with whether or not I should even post this.  It is raw and ugly, but it might help somebody out there.   I might use this as a basis for some more gridSVG posts, but I do not think I have the motivation to finish the analysi... [Read more...]

R/gridSVG/d3 Line Reverse Data Bind

August 8, 2013 | klr

I veer from finance to tech, so let’s use some data from FRED/OECD this time.  I do not think I need to comment much on what has happened to New Car Registrations in Greece. Reverse data binding a line plot from ggplot2 or lattice is slightly more difficult ... [Read more...]

R on Your iPhone (Not the Way You Think)

August 8, 2013 | klr

If you really love R, you should put it on your iPhone.  Apple gives the measurements for its products here. Let's use a little grid magic with ggplot2 to make a chart for the back of your iphone similar to this.
require(grid)<br>require(ggplot2)<br><br># thanks for the Apple measurements<br># https://developer.apple.com/resources/cases/<br>x11(<br>  height = as.numeric(convertX(unit(58.55, "mm"), "in")),<br>  width = as.numeric(convertX(unit(115.15,"mm"), "in"))<br>)<br><br># seems Rstudio make it hard to select a dev use until the new dev is<br># Active<br>dev.set(which = dev.next())<br># draw anything to activate our window<br>grid.text("my R iphone case")<br>
# draw your most beautiful plot with ggplot2 or lattice a good example<br># thanks http://sharpstatistics.co.uk/r/ggplot2-guide/<br>p <- ggplot(iris, aes(Sepal.Length, Sepal.Width)) + geom_point()<br>p + facet_grid(. ~ Species) + stat_smooth(method = "lm")<br>
# draws rectangular and circular(camera) cutout<br>grid.roundrect(<br>  y = unit(28.975, "mm"),<br>  x = unit(57.275, "mm"),<br>  height = unit(57.95, "mm"),<br>  width = unit(114.55, "mm"),<br>  r = unit(8.17, "mm"),<br>  name = "iphoneback"<br>)<br>grid.circle(<br>  y = unit(49.78, "mm"),<br>  x = unit(106.45, "mm"),<br>  r = unit(3.46, "mm")<br>)<br>
Cut and insert in or paste/... [Read more...]

ggplot2 meet d3

August 7, 2013 | klr

With great libraries, just a couple lines of code can do amazing things.  For instance, let’s limit ourselves to less than 10 lines of code and see what ggplot2 and d3 can do.  We will use gridSVG as discussed in yesterday’s post I Want ggplot2/lattice and d3 (gridSVG–... [Read more...]

I Want ggplot2/lattice and d3 (gridSVG–The Glue)

August 6, 2013 | klr

I really like interactive graphics, especially when they come straight from R.  I posted a lot about rCharts, but it is not the only way.  In my mind there are three types of glue to link R to SVG/HTML/Javascript: Let R do the data and then send the ... [Read more...]

Slidify Did That… and That… and…

July 31, 2013 | klr

In my exuberance for rCharts, I have not expressed my equal love for its older sibling slidify.  I adopted slidify a little more slowly than other R bloggers Create elegant, interactive presentations from R with Slidify Interactive slides with go... [Read more...]

ggplot2 with Noam Ross theme

July 26, 2013 | klr

When I first saw Noam Ross' blog post "The null model for age effects with overdispersed infection", I immediately liked the look of his ggplot2 graphs. I was even more delighted when I discovered that he has made his theme available on github. Even though I am all into rCharts, ... [Read more...]
1 2 3 4 5 6 15

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)