In the previous post I plotted multiple fit gaussians onto a data set with ggplot2 - the final model is actually the sum of these fitted gaussians though, so how do I plot that? This is a more tricksy problem. I know I need to nest the mapply function inside another function, but my mind doesn’t immediately leap to the answer - I tried to come up with something quickly, but it inevitably failed.
This post deals with something niche but practical - getting ggplot2 to plot multiple fitted gaussians from a model with different amplitudes. Google failed to provide the answer I was looking for - if you can’t find it with Google, it must need a blog post.
We have a couple of different projects running at the moment that need us to think about mixture models - these are common in single molecule biophysics work as you frequently end up with two or more populations of molecules stretched out along a continuous variable; could be velocity, step size or something else.
I moved my blog! Not just in terms of where it’s hosted, but how the whole thing is built. Previously I’d been using ghost, which was fine up until the moment I wanted to publish more code/analysis. The process of copy-pasting code and exporting images was taking more time than writing the code itself.
I’m now using the blogdown package which builds static websites within RStudio using Hugo and lets you publish the results.
I have a bit of a love hate relationship with kymographs. In the way that they compress data there’s no doubt that you loose information, but in the world of axonal transport and low signal:noise they have clear advantages in enabling quantification.
I covered before a couple of strategies you can use to import image data into R. The next step in my workflow is usually to turn that image into a data table for further analysis.
In May my paper was finally released into the wild. Amongst other things it was the culmination of 4 years of me learning to use R for data analysis (and in my case data = images of cells). I’ve been meaning to blog some of this for a while, but I will try for my own sanity to keep everything in bite size chunks. Starting at the start: data import.