R knitr Markdown: Output Plots within For Loop

前端 未结 4 707
小蘑菇
小蘑菇 2020-12-02 11:55

I would like to create an automated knitr report that will produce histograms for each numeric field within my dataframe. My goal is to do this without having to specify the

4条回答
  •  清歌不尽
    2020-12-02 12:33

    Wrap the qplot in print.

    knitr will do that for you if the qplot is outside a loop, but (at least the version I have installed) doesn't detect this inside the loop (which is consistent with the behaviour of the R command line).

提交回复
热议问题