title: Change sizing policy of a widget in R and save it
body: <p>I use saveWidget function in htmlwidgets to save HTML widgets in R. This worked fine. Since I want to reduce the browser padding to 0, I changed it by adding</p>
  <pre><code>fig.g &lt;- fig.g %&gt;%
  sizingPolicy(browser.padding = 0)
  </code></pre>
  <p>I don't get an error message at this point. However, when I try to save the changed widget, I get the following message:</p>
  <blockquote>
  <p>Error in .getNamespace(pkg) :
  invalid type/length (symbol/0) in vector allocation</p>
  </blockquote>
  <p>Whitout the change to sizingPolicy, the saving works just fine.</p>
  <p>Here my full code:</p>
  <pre><code>ggiris &lt;- qplot(Petal.Width, Sepal.Length, data = iris, color = Species)
  fig.g &lt;- ggplotly(ggiris)
  
  fig.g &lt;- fig.g %&gt;%
    sizingPolicy(browser.padding = 0)
  
  saveWidget(fig.g, &quot;J:/test.html&quot;, selfcontained = T, libdir = &quot;test&quot;)
  </code></pre>
  <p>Has it something to do with how I change the sizingPolicy?</p>