The ten(ish) steps of learning to use a new R package

Step 0: Excitement

We’ve all been there.

You’ve got your hands on some shiny new data. You’ve got a research question. You’re more excited than a small child at Christmas. You’re going to discover something totally new. Life is wonder!

You just need to learn about that new technique you’ve read about in that paper.

Step 1: Initial Joy

So, that new technique…. oh look, there’s an R package for it. That’s convenient. That’s brilliant in fact. I can’t wait to get started. I love being a scientist. Sure, I have no money and no one understands me, but I’m about to embark on a voyage of discovery.

I’ll just download the reference manual from CRAN.

Step 2: Trepidation

Wow, 200 pages? That’s like a short book. Who’d have guessed this sort of thing could be so complex?

Hmmm, the contents doesn’t mean much to me either, guess I’ll just have to read through this page by page until I find the function I need.

I’ll make a cup of tea.

Step 3: Confusion

What?

What does that… what?

What language is this? I know what these words mean individually… but, in this order? Nothing makes any sense.

Who wrote this and why do they hate me?

Step 4: Confusion squared

Is this the function I need?… No.

Maybe this one?… Nope.

Maybe?… No.

Step 5: Confusion cubed

Wait… I think… Yes. This is it. This function does exactly what I need!

I’ll just copy the code, replace their data with my own, and… error code.

Hmmm. I’ll just try changing this argument, and… error code. Again. That’s mildly annoying.

Hmmm. What if I add this…? No, error code, ffs.

What if…? No, error code again.

You know, sometimes R you could be a little bit more helpful. Is that too much to ask for? Rather than just spewing this red error nonsense that no one actually understands. Maybe try helping me a bit, hmmm?

I’ll google it.

Step 6: Confusion / 0

Brilliant, there’s a forum where people are talking about my exact problem.

Wait. What?

I’ll try another forum.

Oh dear god, this is even worse. Are these people actually talking in code?

This is useless. I’m never going to fix this. I’m stuck. I’m going to fail. I’ll have to tell my supervisor… again. My career in science is over. What am I going to do with my life? Maybe my mother was right?

… Oh look, I had a square bracket in my code rather than a curvy one. Maybe that’s the problem? I’ll just change it, and…

Step 7: Soaring Joy

Yes!

Yes, yes, yes, yes!!!

It worked! I can’t believe it, it actually f**king worked!

Ooh, and look at that fancy graph it’s made for me. I’m so excited. If only there was someone to tell, shame everyone else went home hours ago. I love science. Maybe I did make the right life choices?

Step 8: Over-confidence

I am a bonafide genius (no matter what my supervisor thinks).

I understand everything. I’ve learnt this whole package. I can do it all. Well, most of it. And look at these data visualisations, hell, I’ve even got an animation.

This is going to be awesome. Sometimes I surprise myself. Anything is possible, I just have to put my mind to it.

Maybe I’ll get into Nature?

Step 9: Despair

My data is meaningless.

This was a complete waste of time.

Leave a Reply

Your email address will not be published. Required fields are marked *