Due to a bad case of Lifemademelazyanduninspired-itis (inflammation of my lazy gland) last week, there was a dearth of posting. In the meantime, however, I learned a few new things and thanks to some lazy time and figuring out how to access Midnight Train from work, I'm feeling a sparkling of blogging energy. So now I share with you the things I've learned recently in the form of a much needed and overdue List (though some or all of you probably are already aware of some or all of these things).
=== THINGS I'VE LEARNED RECENTLY ===
- Applesauce is a great replacement for oil or eggs when baking!
- Cetaphil is the best, mildest yet effective lotion. I like to think it cured my scary goosebump rash on my face. (I'd like to use a more natural alternative, however. Anyone know of one that is comparable to Cetaphil?)
(photo cred: Cetaphil)
- Copying and pasting in Excel can be a tedious and hand-cramping task when you have many long columns of data to which to apply an input, format or formula. I recently accidentally found a shortcut that can eliminate all that clicking-and-dragging-down. Please see the figures below:
Let's say you want to apply the year 1999 to all the cells in column A. Instead of clicking on the little black box at the lower right corner of cell 2A and dragging all the way down column 2, you can simply double-click on that little black box and '1999' will be applied to all the cells down column 2. Excel miraculously knows to only apply the entered data (or formula) in the subsequent cells that are in rows with other data (and not in leftover blank rows, like in rows 12 and 13 and so on, as seen below).
- Concatenating in SAS is such a helpful function when you need to create a new variable created from smooshing 2 existing variables together, particularly when de-duping your data. The CATX function is something I learned a while ago, but never put to real use until recently. (Nothing beats relearning something in SAS and having it actually work!) The figure below shows the CATX function in the context of some code. Let's say some SAS-savvy pet hoarder wants to keep track of his/her cats and dogs in a nice spreadsheet and wants to consolidate some variables - pet name and age - into one variable. In the data step below, a new dataset named 'pets_ages' is being created out of the existing dataset 'hoarder.' Two variables - CatName and CatAge - are being combined by the CATX function. The result would be something like 'Bud, 2' for a cat named Bud that is 2 years old. The same is repeated for dog names and ages.