R: checks what is the version of package on CRAN

checkPackageVersionOnCRAN {GenABEL} | R Documentation

## checks what is the version of package on CRAN

### Description

Checks what is the version of package on CRAN. The CRAN page (baseUrlCRAN+packageName) is checked and parsed extracting the line with "Package source: packageName_Version.tar.gz" e.g. "Package source: GenABEL_1.6-9.tar.gz" and then the 'Version' is returned. Otherwise, NULL is returned.

### Usage

      checkPackageVersionOnCRAN(packageName,
        baseUrlCRAN = "http://cran.r-project.org/web/packages/",
        timeout = 2)

### Arguments

`packageName` | name of the package to check
`baseUrlCRAN` | path to CRAN repository
`timeout` | web chack timeout

### Value

string containing CRAN version of the package

### Author(s)

Yurii Aulchenko

### Examples

    library(GenABEL)
    packageVersion("GenABEL")
    checkPackageVersionOnCRAN("GenABEL")

[Package GenABEL version 1.8-0 Index]