R · Schema
CRAN Package
Schema for a CRAN R package metadata record as returned by the METACRAN CranDB API
RStatisticsData ScienceOpen SourceProgramming Language
Properties
| Name | Type | Description |
|---|---|---|
| Package | string | Package name on CRAN |
| Version | string | Current package version using semantic versioning |
| Title | string | Short one-line title for the package |
| Description | string | Full package description paragraph |
| Author | string | Package authors, often in Authors@R format |
| Maintainer | string | Package maintainer name and email |
| License | string | SPDX license identifier |
| Depends | string | Required R version and dependent packages |
| Imports | string | Imported packages required at runtime |
| Suggests | string | Optionally suggested packages |
| Enhances | string | Packages enhanced by this package |
| Date | string | Package release date |
| URL | string | URL for the package homepage or development repository |
| BugReports | string | URL for submitting bug reports |
| NeedsCompilation | string | Whether the package requires compilation |
| SystemRequirements | string | External system requirements for the package |
| Repository | string | Repository name (typically CRAN) |
| Date/Publication | string | CRAN publication timestamp |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/r/refs/heads/main/json-schema/r-cran-package-schema.json",
"title": "CRAN Package",
"description": "Schema for a CRAN R package metadata record as returned by the METACRAN CranDB API",
"type": "object",
"properties": {
"Package": {
"type": "string",
"description": "Package name on CRAN",
"example": "ggplot2"
},
"Version": {
"type": "string",
"description": "Current package version using semantic versioning",
"example": "3.4.4"
},
"Title": {
"type": "string",
"description": "Short one-line title for the package"
},
"Description": {
"type": "string",
"description": "Full package description paragraph"
},
"Author": {
"type": "string",
"description": "Package authors, often in Authors@R format"
},
"Maintainer": {
"type": "string",
"description": "Package maintainer name and email",
"example": "Hadley Wickham <[email protected]>"
},
"License": {
"type": "string",
"description": "SPDX license identifier",
"example": "MIT + file LICENSE"
},
"Depends": {
"type": "string",
"description": "Required R version and dependent packages"
},
"Imports": {
"type": "string",
"description": "Imported packages required at runtime"
},
"Suggests": {
"type": "string",
"description": "Optionally suggested packages"
},
"Enhances": {
"type": "string",
"description": "Packages enhanced by this package"
},
"Date": {
"type": "string",
"format": "date",
"description": "Package release date"
},
"URL": {
"type": "string",
"description": "URL for the package homepage or development repository"
},
"BugReports": {
"type": "string",
"format": "uri",
"description": "URL for submitting bug reports"
},
"NeedsCompilation": {
"type": "string",
"enum": ["yes", "no"],
"description": "Whether the package requires compilation"
},
"SystemRequirements": {
"type": "string",
"description": "External system requirements for the package"
},
"Repository": {
"type": "string",
"description": "Repository name (typically CRAN)"
},
"Date/Publication": {
"type": "string",
"format": "date-time",
"description": "CRAN publication timestamp"
}
},
"required": ["Package", "Version", "Title", "Description", "Maintainer", "License"]
}