Preamble: Predictably, this post aged quickly. If you are new to this, look up “Claude Code” 😺
This is actually a procrastination from writing the two other articles Im working on. But, hey, this theme is alive today. My blog, my rules. Procrastination is allowed 😘
Within just a few days I had several conversations, where people were surprised about my use of AI. Most of them had concluded it’s all hallucinations and not useful for research at all. However, it has saved me days of work and upped my level of documentation very much! How do I do?
Claude, code please.
So, it’s not my intention to be too technical in this post, I mostly wanna introduce you to the logic of how to effectively use AI for research. But if you’ve never had a coding course or statistics course, it might look like some magic mumble-jumbo. Because the first use case is coding for statistics.
In the first round of my Ph.D. I used Statistica (on Parallels, running Win 2000 on my MacBook in 2015… because backwards compatibility 🙄). Statistica is a “spreadsheet” based statistics program, on the outside looking a bit like Excel, but on the inside much more specialized.
Statistica is good at doing what it is expected to, but it’s seldom that we just have the perfect data coming out of our experiments to feed it raw. In my case I needed some renaming of the samples to something more meaningful than a time & date and some filtering of wrongly measured samples. This was done “by hand” in Excel.
An here comes the problems. Anezka, do you have the version history of the Excel documents you filtered in 2016? No. Do you remember which settings you used in Statistica? No. Did you document 17 other things that has not (yet) been relevant. Yes.
That’s why I shifted to coding it all in R (Python would also have worked, but my supervisor used R). Now I have notes that exist exactly next to where I need them:
Every time I run this code, it does the same thing. If I run it in 2035, it will still do the same thing.
And while I have some coding experience, and the above mentioned example is actually rather easy to code, MY GOD, Claude AI can code fast. This was early in the process and a easy task. A little later, I gave it the task in the screenshot below. Notice I do give it hints about how to work, but the questions it is asking me are truly important. It saves me a lot of time to have it ask these questions, as when I reply, it gets the exact information it needs. I could provide it in the prompt, but I usually forget something. Also, it remembers my data structure AND asks for clarification when Im not clear.

After replying to these questions I got 150 lines of code that just worked. It took me maybe 10 min to prompt and 2-3 min for Claude to output its result. I could in no way not have written 150 lines of (bug-free) code in 15 min.
Of course I look through the code. I also check numerical outputs. I have after 3 months of extensive use yet to find any error in its application of statistical methods. A few times it has messed up the graphical output, but solvable. If I don’t understand a result or a chunk of code, I ask Claude about it, and we either update my understanding or debug it together. Which relates to the next use case:
Claude, please explain to me.
The second use case is as an alternative to a textbook. There’s plenty of aspects of my Ph.D. that is not at all cutting edge, but pure textbook methods, invented in the 80’ies or even earlier. These methods are widely described, and therefore a good example of how AI can tailor your learning. Look at this:
This might be unintelligible for you, but it was exactly the result I was looking for. After plenty of conversations, Claude knows my statistical understanding and presents these methods at exactly the level I need it. I do own some statistical textbooks, but I can’t ask them questions.
It is also very good at explaining articles outside my own field. Notice how specific I am in my prompting. “Explain to me” is daunting, but clarifying your desires is better.
Okay, but for realz, doesn’t it hallucinate?
Oh yeah. It often adds analyses I haven’t thought of. Like, when it made a vast list of all my measured cress bags sorted pr. experiment, and I found out that some of the experiments my colleague had made were missing. Thanks, Claude.
Sometimes it also adds summaries. Or fall-back options. And plenty of statistical explanations that I didn’t ask for. But I accept my defeat, I’d never get as excited about commenting the process as Claude is.
So, yay!
By now Claude has coded >5.000 lines of code for me, analyzing more than ~20.000 cress seedlings and 840 biocrystallization samples with each 15 different parameters.
And I’m slowly getting an overview of what can be published 👩💻🤞






