Installing a SSD drive into a mid-2007 iMac

I have a mid-2007 iMac with a 2.4 GHz Core2Duo processor and despite the fact that it is already six years old, it still does a good job. However, compared to a friend's recent MacBook Air with a solid state disk (SSD) it felt sluggish when opening programmes and loading larger documents.

So, I thought it would be worthwhile to replace the old spinning hard disk drive with an SSD, instead of buying a new computer. I still like the display of the iMac. Hence, I got myself a Samsung 840 SATA drive, as it came with a USB cable and bracket hard drive holder.

It actually wasn't that difficult to replace the hard drive in my iMac. Of course I can give no guarantee that this works for you as well. Here are the steps I took:
So far I am really happy with the new SSD. Applications are opening much faster and overall the computer feels much snappier. It looks like it can serve me quite a little longer.

Here are a few pictures of the surgery:

iMac with glass panel and bezel removed
Display and hard drive removed
New SSD and old HDD

Screen shot of the new system preferences

Setting axes limits with googleVis

I posted about the various googleVis axis options for base charts, such as line, bar and area charts earlier, but I somehow forgot to mention how to set the axes limits.

Unfortunately, there are no arguments such as ylim and xlim. Instead, the Google Charts axes options are set via hAxes and vAxes, with h and v indicating the horizontal and vertical axis. More precisely, I have to set viewWindowMode : 'explicit' and set the viewWindow to the desired min and max values. Additionally, I have to wrap all of this in [{}] brackets as those settings are sub-options of h/vAxes. There are also options minValue and maxValue, but they only allow you to extend the axes ranges.

Here is a minimal example, setting the y-axis limits from 0 to 10:




With more than one variable to plot I can use the series argument to decide which variables I want on the left and right axes and set the viewWindow accordingly. Again, here is a minimal example:



Session Info

sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] googleVis_0.4.3

loaded via a namespace (and not attached):
[1] RJSONIO_1.0-3

R in Insurance: Presentations are online

The programme and the presentation files of the first R in Insurance conference have been published on GitHub.

Front slides of the conference presentations

Additionally to the slides many presenters have made their R code available as well:
  • Alexander McNeil shared the examples of the CreditRisk+ model he presented.
  • Lola Miranda made a Windows version of the double chain-ladder package DCL available via the Cass knowledge web site.
  • Alessandro Carrato's 1-year re-reserving code is hosted on the ChainLadder project web site.
  • Giorgio Spedicato's life contingencies package is on CRAN already.
  • Simon Brickman and Adam Rich's HTML presentation and underlying R code for Automated Reporting is included in the GitHub repository.
  • Stefan Eppert pointed out that KatRisk published an illustrative catastrophe model in R.
  • Hugh Shanahan's code to integrate R with Azure for high-throughput analysis is on GitHub.
Thanks again to all the presenters who have helped to make the event a success.

Hopefully, we see you again next year!

Review: Kölner R Meeting 19 July 2013

Despite the hot weather and the beginning of the school holiday season in North Rhine Westphalia the Cologne R user group met yet again for two fascinating talks and beer and schnitzel afterwards.

Analysing Twitter data to evaluate the US Dollar / Euro exchange rates


Dietmar Janetzko presented ideas to forecast US Dollar / Euro exchange rate movements for the following day.


To forecast exchange rate movements, Dietmar distinguishes two school of thoughts. The first one is based on the analysis of fundamental analysis, e.g. figures of GDP, debt, unemployment, etc. and the other one is based on news, e.g. announcements from central banks, e.g. from Ben Bernanke and other industry experts.

While the data for the fundamental analysis is usually updated slowly, e.g. annually or quarterly, news can be of higher frequency and less regular. As a result the forecasting horizon in a very liquid market, as the forex market, can vary from one minute or less to next year or decade.

Dietmar's aim was to forecast the exchange rate for the following day and to outperform the forecast of a random walk. For his experiment he used daily exchange rates from Quandl, which has a nice R interface, and Twitter data from topsy, which gives him access to Twitter's 'firehose'.

For his analysis Dietmar focused on the number of tweets of the terms Euro + Crisis + <concept>, whereby he used a dictionary of nearly 600 different concept words.

His training algorithms used functions of the following packages: forecast, caret and car, looking for predictors that have a smaller error than a random error.

It goes without saying that Dietmar hasn't made millions from his algorithms yet, but the discussion and the end of his presentation will hopefully have given him a few pointers to do just that.

Graphs in R


Afshin Sadeghi, who has a background in Steiner tree methods for Protein-Protein interaction networks, gave an overview of the various graph packages in R. He started his talk with a little overview of the graph terminology of nodes, edges, trees, directed and undirected graphs.


Afshin then gave a brief overview of the various graph packages in R and the different visualisation options. The most popular package seems to be igraph, maintained by Gabor Csardi. Although different packages use sometimes different graph objects, there are often conversation tools available, e.g. igraph.to.graphNEL, allowing users to use the best algorithms from all packages.

You can access Afshin's slides via our Meetup site.


Next Kölner R meeting

The next meeting has been scheduled for 18 October 2013.

Please get in touch if you would like to present and share your experience, or indeed if you have a request for a topic you would like to hear more about. For more details see also our Meetup page.

Thanks again to Bernd Weiß for hosting the event and Revolution Analytics for their sponsorship.

Quick review: R in Insurance Conference

Yesterday the first R in Insurance conference took place at Cass Business School in London.

I think the event went really well, but as a member of the organising committee my view is probably skewed. Still, we had a variety of talks, a full house, a great conference dinner and to top it all, the Tower Bridge opened while we had our drinks at the end of the evening.

I will post a more complete review in the future with links to the files of the presentations and R code, once we had a chance to collate all the information.

Many thanks again to all who helped to make this event a success, particularly Andreas Tsanakas at Cass and to our sponsors Mango Solutions and CYBAEA.

Lecture room

Breakout area

Conference dinner at Cantina del Ponte

Tower Bridge

googleVis tutorial at useR!2013

Today Diego and I will give our googleVis tutorial at useR!2013 in Albacete, Spain.

googleVis Tutorial at useR! 2013

We will cover:
  • Introduction and motivation
  • Google Chart Tools
  • R package googleVis
    • Concepts of googleVis
    • Case studies
  • googleVis on shiny

There is definitely R in July


The useR!2013 conference in Albacete, Spain, will commence next Wednesday, 10 July, and on the day before Diego and I will give a googleVis tutorial.

The following Monday, 15 July, the first R in Insurance event will take place at Cass Business School and I am absolutely delighted with the programme and the fact that we are sold out.

On Tuesday, 16 July, the LondonR user group meets in the City, awaiting presentations by Andrie de Vries (Revolution Analytics), Rich Pugh (Mango Solutions) and Hadley Wickham (RStudio).

Finally on Friday, 19 July, the next Cologne R user group meeting is scheduled with two talks: Predicting the Euro/Dollar exchange rates with Twitter (Dietmar Janetzko) and Networks in R using igraph (Afshin Sadeghi).