The following was adapted from the blog post here.
The key is to use results = "asis"
. More information can be found here. Basically:
- anything output with
cat()
will be evaluated as RMarkdown. - anything output with
print()
will be evaluated with R.
for(i in seq(min(station_key$year), max(station_key$year), 1)){