R knitr Markdown: Output Plots within For Loop

前端 未结 4 703
小蘑菇
小蘑菇 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

    Wish to add a quick note: Somehow I googled the same question and get into this page. Now in 2018, just use print() in the loop.

    for (i in 1:n){
    ...
        f <- ggplot(.......)
        print(f)
    }
    

提交回复
热议问题