added a version that works in rCharts open_notebook()