r从多个R文件创建文档

时间:2018-05-14 22:06:26

标签: r

我有一个包含多个.R文件的项目。它们需要按顺序运行(从一个输出输入到下一个,等等)。每个都是独立的,期望之前生成它所需的输入。我有一个我调用automate.R的R文件,它以正确的顺序来源每个.R文件。每个.R文件都以一些带有rmarkdown代码的文本开头,如下所示。

#' @title calculate nutrient requirements for SSP age group categories
#' @author Gerald C. Nelson, \email{nelson.gerald.c@@gmail.com}
#' @keywords utilities, IMPACT data, gdx
# Intro -------------------------------------------------------------------

# Copyright (C) 2015 - 2018 Gerald C. Nelson, except where noted
#' @description - This script calculates nutrient requirements for SSP age group categories
#' The source of the requirements is
#' @source \url{http://www.nal.usda.gov/fnic/DRI/DRI_Tables/recommended_intakes_individuals.pdf}
#' @include nutrientModFunctions.R

最终我可能想将其中的一部分转换为包,但是现在,如何将每个脚本中包含markdown标记的行合并到一个文档文件中?整个项目可在https://github.com/GeraldCNelson/nutmod获得,以防有人想要一些特定的R代码。

0 个答案:

没有答案