How do I send my gganimate html animation to a colleague?

377 views Asked by At

I have made an animation using gganimate, and output it using the command:

gganimate(p, 'tmp_20161220_animation_output.html')

I can see that this file is in my working directory. However, when I open the source of the html page I don't see where it is getting the animation files from. I am sure if I just emailed my colleague this html file the animations will not work on their computer. What should I do to enable sharing of my animation?

Source of html file, note that while images seem to be stored in a images subdirectory, no where in this code is this directory referenced:

<html>
<head>
    <meta charset="utf-8" />
    <meta name="generator" content="R package animation 2.4">
    <title>Animations Using the R Language</title>
    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/styles.css" />
    <link rel="stylesheet" href="css/scianimator.css" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/github.min.css">

    <script src="js/jquery-1.4.4.min.js"></script>
    <script src="js/jquery.scianimator.min.js"></script>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"></script>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/r.min.js"></script>
  <script>hljs.initHighlightingOnLoad();</script>

</head>
<body>

    <div class="scianimator"><div id="Rplot" style="display: inline-block;"></div></div>
    <div class="scianimator" style="width: 480px; text-align: left"><pre><code class="r">## Animations generated in R version 3.3.2 (2016-10-31)
##   using the package animation
library(gganimate)
library(data.table)
library(dplyr)
library(purrr)
library(readr)
library(tidyr)
library(tibble)
library(ggplot2)
library(tidyverse)
library(RPostgreSQL)
library(DBI)
expr
## R version 3.3.2 (2016-10-31)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Other packages: gganimate 0.1, data.table 1.10.0, dplyr 0.5.0, purrr 0.2.2, readr 1.0.0, tidyr 0.6.0, tibble 1.2, ggplot2
## 2.2.0, tidyverse 1.0.0, RPostgreSQL 0.4-1, DBI 0.5-1</code></pre></div>
    <script src="js/Rplot.js"></script>
<!-- highlight R code -->

</body>
</html>
0

There are 0 answers