Another Emacs trick – quick text swap

I’m currently attending the “R / Bioconductor for high-throughput sequence analysis” workshop at the Fred Hutchinson Research Centre in Seattle. I have always enjoy attending these workshops even during the “introduction to R” sections since I really enjoy seeing other people’s coding styles. There are so many nifty tricks with R, emacs…etc that I’ll never learn all the function out there. Furthermore, there are things that I go do in a round-about way but I’ve done it so many times, I just assume it’s logical. (Such as mapply for applying the apply functions to multiple objects!) I need to make sure I don’t become complacent with what I do know and to always keep an eye out for new things.

Saw the instructor using this trick and just couldn’t help myself and had to ask. So the quick text manipulation tip for emacs: To switch between two characters, C-shift-t. Whereas to switch between two words on the different sides of a comma, use C-M-t! This applies to not just your *R* buffers but in almost all buffers!

Lately I feel like I enjoy doing silly little R acrobatics more than any serious data analysis. Not sure if I should be happy that I’ve got another clue towards narrowing down that I enjoy doing or should I be depressed that I like those little things more than the more “interesting” work…….

Anyhow, I’m happy with enjoying the little things (thanks Zombieland). Any other favourite R or emacs or ess or programming tricks? Always happy to learn more! Happy coding people!


Tags: ,

About lucialam

attempts at organizing my thoughts and mind

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: