extract_version {risk.assessr} | R Documentation |
Extract Package Version from File Path
Description
This function extracts the version number from a package source file name based on the package name and expected file pattern.
Usage
extract_version(path, package_name)
Arguments
path |
A character string specifying the file path or URL. |
package_name |
A character string specifying the name of the package. |
Value
A character string representing the extracted version number, or 'NULL' if no match is found.
Examples
## Not run:
link <- "https://bioconductor.org/packages/3.14/bioc/src/contrib/GenomicRanges_1.42.0.tar.gz"
extract_version(link, "GenomicRanges")
## End(Not run)
[Package risk.assessr version 2.0.0 Index]