This function retrieves all available versions of a package, including the latest version, by parsing the provided version table and querying the RStudio Package Manager.
Value
A list with the following elements:
- all_versions
A list of named lists, each containing:
- version
The version number of the package.
- date
The associated publication date as a string.
- last_version
A named list containing the latest version of the package with:
- version
The latest version number.
- date
The publication date of the latest version.
May be
NULLif the API call fails.
Examples
if (FALSE) { # \dontrun{
# Define the input table
table <- list(
list(
package_name = "here",
package_version = "0.1",
link = "here_0.1.tar.gz",
date = "2017-05-28 08:13",
size = "3.5K"
),
list(
package_name = "here",
package_version = "1.0.0",
link = "here_1.0.0.tar.gz",
date = "2020-11-15 18:10",
size = "32K"
)
)
result <- get_versions(table, "here")
print(result)
} # }
