1

I am attempting to use "knitR" to create an html that would contain general description and 700+ figures -something like here

In the desired output, the figure widths are the same, but their heights will differ (depending on the available data) - something like here

I wonder how to modify the knitR "fig.width" set up to accommodate these changes. My current line of code dealing with the figures is as follows:

<!--begin.rcode fig.width = 8, echo=FALSE,warning=FALSE, message=FALSE,results='asis'

for(i in 1:length(fl) ) { # fl is a list with figure datafiles
  load(fl[[i]])
  cat('<li>
         <div class="panel panel-default"><div class="panel-default">')
         print(rfidsplot) # prints the lattice plot
         cat( '</div><div class="panel-primary panel-footer">',
            caption2html(figCap) # prints the legend
  , '</div>
  </div>

     </li>')
 }
end.rcode -->
Vinoth Krishnan
  • 2,925
  • 6
  • 29
  • 34
Martin Bulla
  • 41
  • 1
  • 3
  • I'm under the impression that figure height and width can only be set for a given chunk. That means each plot with varying height would need a different chunk. I too would be curious if there is a simple workaround - it has eluded me as well. – zacdav May 11 '16 at 07:20
  • Generating figures with different `fig.width` values is [not simple (assuming that answer is not outdated)](http://stackoverflow.com/a/33723600/2706569). – CL. May 11 '16 at 07:59

0 Answers0