A collection of useful standalone R functions

addalpha | Add transparency (alpha) to a vector of colours |

epicurve | Draw a classic style epidemic curve (with rectangles) |

epikml | Plot geocoded cases in a KML file |

getCoef | Get estimates for a parameter combination from a regression... |

isoweek | Calculate the ISO week & year for a Date |

isoweekStart | Calculate the start date of a given ISO week |

ma | Calculate a simple moving average |

mgsub | Multiple argument version of gsub() |

nameMe | Name a vector on-the-fly |

piformat | Pretty-printer for p-values |

plotBand | Plot a band (e.g. confidence band) in a chart |

plotColors | Plot colors from R's color palette |

vecshift | Create lagged or lead variables |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.