Using source subdirectories within R packages with

2019-01-18 05:08发布

I would like to use a directory structure within the R folder for the source code of a package. For example, within my R folder I have an algos folder with functions I want to export and document. However roxygen2 by default does not seem to go through the subfolders of the R folder.

I tried to use the @include keyword as follows for a file at `R/algos/algo1.r'

#' @include algos/algo1.r

but without success. Is there a simple way to use subfolder for the R source code?

1条回答
再贱就再见
2楼-- · 2019-01-18 05:50

Writing R Extensions has this to say (in Section 1.1.5) about subdirectories under the R directory:

The R and man subdirectories may contain OS-specific subdirectories named unix or windows.

Implied in this is that they can't have other subdirectories other than those two. This is confirmed in an r-devel thread and again later in another r-devel thread.

查看更多
登录 后发表回答