.:. Megarhyssa .:.

A place for me to post pictures for family and friends, plug the odd interesting Web page, and discuss issues that are on my mind.

Wednesday, July 23, 2008

LaTeX for Mac

Whew, it's been a long time since my last post -- between work emails and (more recently) Facebook, my spare time for blogging/keeping up with folks for leisurely purposes has apparently all but vanished.

Why the post now? Well, continuing the theme of some previous posts, I'm writing to say that I've finally made the leap and tried LaTeX for document creation. Admittedly, I haven't been brave (foolish?) enough to completely severe my ties with the M$ equivalents. However, I will be writing my new biostatistics lectures with LaTeX, and I'm pretty excited about that, given the likely amount of formulae I'll want to include over the span of 18 lectures.

My front end is TeXShop, and I've also installed Beamer for presentations. Want a fool-proof installation experience? Then go here (for TeXShop) and then here (for Beamer). I don't throw around 'sudo' and 'bash' in everyday conversation (yet?), so it was nice to have step-by-step instructions in both cases.

Monday, February 12, 2007

Octopus Joke

Not sure if this is an original one (it came to me in the shower this morning), but a Google search didn't come up with anything. Anyways, here goes:

Q - Why did the octopus linebacker win the Defensive Player of the Year award?

A - Because he had ten-tacles in every game!

OK, I won't quit my day job, but it's at least safe for a mixed crowd. :)

Thursday, February 08, 2007

Plotting degrees in R

Recently, I came across the problem of wanting to plot x values that were geographical coordinates (that is, I wanted to include degrees on the axis, or in the x axis label). After some puzzling over the issue (recall that I'm an R noob), I came across a query and answer on the R-help mailing list. Extremely useful as I found it, it lacked one element: the case in which you want to plot your own data, and only use the "at" part of the solution for creating labelled tick marks. Partially for my own benefit, I've added to the code suggested by Mark Schwartz, and I hope that somebody out there finds this helpful. Incidentally, this should be taken as an advertisement for R - scarcely a month after first picking up the package, I'm confident enough to edit and create code that produces publication-quality graphics.

# Create vector of x values for which you want degree labels
at <- seq(49, 54, 1)

# Create data to be plotted (normally, you will have data from
# columns in a spreadsheet)

x <- c(49, 50, 51, 52, 53, 53.8)
y <- c(1000, 1300, 1500, 1400, 1350, 1050)

# Create part of plot
plot(x, y, xlim = range(at), xaxt = "n", xlab = "Latitude", ylab = "Elevation (m a.s.l.)")

# Now create a set of plotmath expressions, one for
# each value of 'at' using paste() and parse()
# The general format for the degrees symbol is x*degree
# However, to add the "N" we use the "~" to create
# a right and left hand side for the expression and
# place the "N" after it. The "~" will not print.

L <- parse(text = paste(at, "*degree ~ N", sep = ""))

# Now do the x axis
axis(1, at = at, labels = L)

Friday, February 02, 2007

Open Source Fever

Well, after deciding that I was going to learn R for statistical analyses, I've been thinking quite a bit about other open source / freeware programs that I might switch to. One such application that I've started tinkering with is S5 - in the creator's own words, it's 'a slide show format based entirely on XHTML, CSS, and JavaScript.' Put bluntly, a clever cross platform alternative to Microsoft's bloated presentation software. No more worrying about what OS the conference computer is running - just fire up a web browser (preferably not IE) and off you go! It's a bit daunting to contemplate converting my existing lectures to this format, but I'm very seriously considering using it for new lectures.

I've also flirted with the idea of using LyX for document processing, again in favour of an well known (and equally bloated) MS application. Not sure if I'll go through with that or not -- in addition to not being sure how I'll deal with the inevitable .doc files that will clutter my Inbox, I was put off by the plethora of other helper programs that need to be installed first. Let's say that installing and using LyX is on the backburner for now.

Finally, I wrote this entry with the free text editor Smultron.

Monday, January 15, 2007

R (finally!)

Well, I finally did it -- I've starting using R for my statistical analyses. I've been thinking about making the switch for ages, but it really took a demonstrated need to kickstart it... in this case, I thought I'd want to conduct a quantile regression on the relationship between elevation and species richness for a dataset I'm working with.

In the end, I may not even go with that analysis (mostly because R has opened up other possibilities), but I'm so happy that I made the leap... next step, using the package "vegan" for multivariate analyses of environmental data, so that I'm freed from the constraints of using CANOCO, which is installed on a single PC in my lab.

Thinking of making the switch? Do it, but you'll probably find it easier if you have a good book for reference (such as Michael Crawley's "Statistics: An introduction using R") -- otherwise, you might be put off by the initial command line window, which just stares back at you :).

Wednesday, December 27, 2006

Happy Holidays to All


Against my initial better judgement, we took advantage of the pre-Christmas rush in late November and got a picture of our son with Santa. Now I'm glad we did -- not only did we support the local firefighters (or one of their designated charities, can't remember which), but we also snapped a pic we really like.

I hope everybody out there is also having a fabulous holiday season, and all the best for the upcoming new year.

Santa originally uploaded by megarhyssa.

Tuesday, December 26, 2006

Music Map

I just came across a cool web-based music utility called music map. Simply type in the name of a band you like, such as Underworld and... wait for it... a little longer now... it will provide a "map" of other bands similar to the focal one. In their own words "the closer two artists are, the greater the probability people will like both artists" -- handy if, like me, you're looking to expand your music horizons.