strangely, I didn\'t come upon this while browsing online. Basically I am trying to apply the sub(...) function to a simple data frame. Please refer to the following example