title: forceNetwork in R
body: <p>I have called the following and it makes an HTML file with networkD3 perfectly.</p>
  
  <pre><code>forceNetwork(Links=g2$links, Nodes=g2$nodes, Source='source', Target='target', NodeID='name', Group='group', opacityNoHover=TRUE, Nodesize='group',height = 1000, width = 1000, fontSize = 20,linkDistance=200,clickAction = mcs2, zoom=TRUE)  %&gt;% saveNetwork(file = "test-network.html")
  </code></pre>
  
  <p>However in the created HTML it sets the <code>fill</code> parameter for the browser and viewer to be <code>false</code>.</p>
  
  <pre><code>&lt;script type="application/htmlwidget-sizing" data-for="htmlwidget-18644f4e905f10bd8c40"&gt;
      {"viewer":{"width":1300,"height":1300,"padding":10,"fill":false},"browser":{"width":1300,"height":1300,"padding":10,"fill":false}}
  &lt;/script&gt;
  </code></pre>
  
  <p>The above is from the generated HTML file and is the final <code>&lt;script&gt;</code> tag that is generated from the <code>saveNetwork</code> call. </p>
  
  <p>How can I change the <code>fill</code> and <code>padding</code> values from R before calling <code>saveNetwork</code> in R through perl? Below is the code that does not produce the desired effects.</p>
  
  <pre><code>$r-&gt;run(q`fn &lt;- fn &lt;- forceNetwork(Links = MisLinks, Nodes = MisNodes, Source = "source", 
                 Target = "target", Value = "value", NodeID = "name",
                 Group = "group", opacity = 0.4, zoom = TRUE)`);
  $r -&gt; run(q`fn$sizingPolicy$viewer$fill &lt;- TRUE`);
  $r -&gt; run(q`fn$sizingPolicy$browser$fill &lt;- TRUE`);
  $r -&gt; run(q`saveNetwork(fn, file = "test-network.html", selfcontained=TRUE)`);
  </code></pre>
  
  <p>However this still outputs the fill parameter with "false".</p>