Archive for April, 2014

April 23rd, 2014

On the 23rd January 2014, exactly one day before the 30th anniversary of the Apple Mac, I took delivery of my first ever Apple computer – a late 2013 model MacBook Air. I still heavily use Windows and Linux machines at home and at work but the laptop I cart around with me is now a Mac and I like it a lot.

Until I bought the MacBook Air, I hadn’t used Macs very much and I quickly realised I had a lot to learn. As I figured things out, I kept notes and I’ve turned these notes into a .pdf document that may be of use to others. The document covers

  • General Mac stuff – Some answers to various questions I had.
  • Linux-centric tips – Things I am used to on Linux, and how to do them on OS X.
  • Windows-centric tips – Things I am used to on Windows, and how to do them on OS X.
  • Software – How-tos – General software-related questions I had.
  • Software -Listed by task – The software I like to use.
  • Mac OS X Environmental changes – Some changes I made to OS X

I intend to keep this updated as I learn more and feedback is welcomed via the usual channels.

 

April 4th, 2014

A colleague recently sent me the following code snippet in R

> a=c(1,2,3,40)
> b=a[1:10]
> b
[1]  1  2  3 40 NA NA NA NA NA NA

The fact that R didn’t issue a warning upset him since exceeding array bounds, as we did when we created b, is usually a programming error.

I’m less concerned and simply file the above away in an area of my memory entitled ‘Odd things to remember about R’ — I find that most programming languages have things that look odd when you encounter them for the first time. With that said, I am curious as to why the designers of R thought that the above behaviour was a good idea.

Does anyone have any insights here?

TOP