You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# rdocdump (development version)
1
+
# rdocdump 0.1.1 (2025-08-21)
2
+
3
+
* Added `version` argument to `rdd_to_txt()` and `rdd_extract_code()` functions to specify the version of the package to download from CRAN for processing.
Copy file name to clipboardExpand all lines: R/extract_code.R
+32-19Lines changed: 32 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,16 @@
5
5
#'
6
6
#' @param pkg A `character` string specifying the package. This can be:
7
7
#' \itemize{
8
-
#' \item an installed package name,
9
-
#' \item a full path to a package source directory,
10
-
#' \item a full path to a package archive file (tar.gz), or
11
-
#' \item a package name not installed (which will then be downloaded from CRAN).
8
+
#' \item an installed package name,
9
+
#' \item a full path to a package source directory,
10
+
#' \item a full path to a package archive file (tar.gz), or
11
+
#' \item a package name not installed (which will then be downloaded from CRAN).
12
12
#' }
13
13
#' @param file Optional. Save path for the output text file. If set, the function will return the path to the file instead of the combined text. Defaults to `NULL`.
14
14
#' @param include_tests `logical`. If `TRUE`, for non-installed packages, the function will also include R source code from the `tests` directory. Defaults to `FALSE`.
15
15
#' @param include_roxygen `logical`. If `TRUE`, roxygen2 documentation lines (lines starting with "#'") from R files will be included in the output. Defaults to `FALSE`.
16
-
#' @param force_fetch `logical`. If `TRUE`, the package source will be fetched from CRAN even if the package is installed locally. Default is `FALSE`.
16
+
#' @param force_fetch `logical`. If `TRUE`, the package source will be fetched from CRAN even if the package is installed locally. Default is `FALSE`, but when `version` is specified, it will be set to `TRUE`.
17
+
#' @param version Optional. A `character` string specifying the package version to fetch from CRAN. If not provided, the latest version will be used.
17
18
#' @param cache_path A `character` string specifying the directory to use as a cache. Defaults to the value of `getOption("rdocdump.cache_path")`.
0 commit comments