Generating pander tables in a loop in RMarkdown in Rstudio

三世轮回 提交于 2019-12-04 08:12:26
Gabriel del campo

In the for loop there is not 'output screen' unless you use the print(x) function.

for (i in 1:4) { i } does not display anything

for (i in 1:4) {print(i)} displays the Numbers 1 2 3 and 4

Solution: In the FOR loop construct the table (using knitt) and assign it into a variable. Then print out this variable using print() function. Remember. You Must add blank lines after and before the var table: use paste function inside print()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!