Tag Archives: function

How to Vectorize a Function in R

Last year I came across the base R function Vectorize(). Vectorize() vectorizes the action of a non-vectorized function. Let’s give an example. In one of my current research projects, I need to hash patient ids to fulfill the requirements of … Continue reading

Posted in Indroduction, Tips & Tricks | Tagged , , | Leave a comment

Drawing a Fish Curve using R and ggplot2

Intro Recently, I wondered whether there is a way to draw a fish shape using a mathematical function. Since I did not find a ready-made R function, I tried to write the function by myself. The equations, I've used for … Continue reading

Posted in Tips & Tricks, Visualizing Data | Tagged , | Leave a comment