Perfectly Random

machine learning and stuff

Time is TRUE, Female is FALSE

Introduction R has two reserved words denoting logical constants, namely TRUE and FALSE. These are case sensitive literals and you cannot create a variable or a function named TRUE or FALSE. > TRUE <- 1 Error in TRUE <- 1 : invalid (do_s... Read more

Never trust rownames of a dataframe

Introduction Dataframes in R have both column names and row names. Column names, which are used frequently, give the dataframes in R their characteristic distinction. Row names, on the other hand, are rarely used. Usually, row names appear to be t... Read more

The Colon "Operator" in R

Background Colon (":") is an operator1 in R2 that generates regular sequences. We can take a look at the documentation of the ":" function1 by typing in > ?":" at the prompt. We can generate a vector of integers from 1 to 10 (both inclusive)... Read more

Color highlighting for diff in ST3

I frequently need to perform a diff on two of my open views in Sublime Text 3. I use the EasyDiff package for this purpose. This package works nicely and shows me the diff changes in a new ST3 tab. The only problem was that the changes showed up w... Read more

Always on top in MacOS Yosemite

Update: This works on El Capitan as well. As the next installment in the never-ending cat-and-mouse game between Apple and the developers, EasySIMBL stopped working for many people after updating to version 10.10.4 (read comments). As suggested b... Read more

Using Git 3

Third installment of my Using Git series. See my previous posts Using Git 2 and Using Git. Showing only files that changed in the last commit You can always see the changes made in the last commit using git show But, on occasions, you just wan... Read more