{
  "_id": "6a197bbaacfb0bcc41df5ff2",
  "Package": "ggspec",
  "Type": "Package",
  "Title": "Extract and Compare 'ggplot2' Plot Specifications as Tidy Data\nFrames",
  "Version": "0.1.0",
  "Authors@R": "person(\"Clement\", \"Lee\", email = \"clement.lee.tm@outlook.com\", role = c(\"aut\", \"cre\"), comment = c(ORCID = \"0000-0003-1785-8671\"))",
  "Author": "Clement Lee [aut, cre]\n(<https://orcid.org/0000-0003-1785-8671>)",
  "Maintainer": "Clement Lee <clement.lee.tm@outlook.com>",
  "Description": "Inspects 'ggplot' objects by extracting their full\ndeclarative specification - layers, aesthetic mappings, scales,\nfacets, coordinate systems, and labels - as tidy data frames. A\nsecond tier of functions enables structural comparison of two\n'ggplot' objects, supporting automated plot testing, auditing,\nand framework-agnostic grading workflows. Unlike 'ggcheck',\nwhich is designed exclusively for 'learnr'/'gradethis'\npipelines and returns ad-hoc objects, 'ggspec' returns\nrectangular, pipeable output and does not require any grading\nframework as a dependency.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.2.3",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "URL": "https://github.com/clement-lee/ggspec",
  "BugReports": "https://github.com/clement-lee/ggspec/issues",
  "Repository": "https://clement-lee.r-universe.dev",
  "Date/Publication": "2026-05-21 10:09:58 UTC",
  "RemoteUrl": "https://github.com/clement-lee/ggspec",
  "RemoteRef": "HEAD",
  "RemoteSha": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-29 10:27:27 UTC",
    "User": "root"
  },
  "MD5sum": "36931c220de23419030f948abb7a2395",
  "_user": "clement-lee",
  "_type": "src",
  "_file": "ggspec_0.1.0.tar.gz",
  "_fileid": "69a058f8b11342d27fd8ac8aec0402d250c5b2b9b5564c025cc9ceed26c4fb36",
  "_filesize": 365170,
  "_sha256": "69a058f8b11342d27fd8ac8aec0402d250c5b2b9b5564c025cc9ceed26c4fb36",
  "_created": "2026-05-29T10:27:27.000Z",
  "_published": "2026-05-29T11:42:50.168Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78483278678,
      "time": 142,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7288604118"
    },
    {
      "job": 78483278675,
      "time": 173,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7288613229"
    },
    {
      "job": 78483278869,
      "time": 220,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7289820556"
    },
    {
      "job": 78483278660,
      "time": 144,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7289793886"
    },
    {
      "job": 78482833247,
      "time": 185,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7288562048"
    },
    {
      "job": 78483278719,
      "time": 110,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7288594813"
    },
    {
      "job": 78483278731,
      "time": 101,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7288592278"
    },
    {
      "job": 78483278749,
      "time": 111,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7288594896"
    },
    {
      "job": 78483278739,
      "time": 105,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7288595242"
    }
  ],
  "_buildurl": "https://github.com/r-universe/clement-lee/actions/runs/26631965461",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/clement-lee/ggspec",
  "_commit": {
    "id": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
    "author": "clement-lee <clement.lee.tm@outlook.com>",
    "committer": "clement-lee <clement.lee.tm@outlook.com>",
    "message": "Fix Description, \\dontrun/\\donttest, wrapping suggested pkgs\n",
    "time": 1779358198
  },
  "_maintainer": {
    "name": "Clement Lee",
    "email": "clement.lee.tm@outlook.com",
    "login": "clement-lee",
    "orcid": "0000-0003-1785-8671",
    "description": "Lecturer at School of Mathematics, Statistics and Physics, Newcastle University",
    "uuid": 18400316
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "ggplot2",
      "version": ">= 3.4.0",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "version": ">= 1.1.0",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "version": ">= 3.2.0",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "version": ">= 1.1.0",
      "role": "Imports"
    },
    {
      "package": "learnr",
      "role": "Suggests"
    },
    {
      "package": "palmerpenguins",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "MASS",
      "role": "Suggests"
    },
    {
      "package": "covr",
      "role": "Suggests"
    }
  ],
  "_owner": "clement-lee",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-15",
      "n": 2
    },
    {
      "week": "2026-16",
      "n": 5
    },
    {
      "week": "2026-18",
      "n": 2
    },
    {
      "week": "2026-19",
      "n": 4
    },
    {
      "week": "2026-21",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "clement-lee",
      "count": 14,
      "uuid": 18400316
    }
  ],
  "_userbio": {
    "uuid": 18400316,
    "type": "user",
    "name": "Clement Lee",
    "description": "Lecturer at School of Mathematics, Statistics and Physics, Newcastle University"
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/ggspec"
  },
  "_devurl": "https://github.com/clement-lee/ggspec",
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/ggspec.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/clement-lee/ggspec",
  "_realowner": "clement-lee",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2026-05-28"
    }
  ],
  "_exports": [
    "assert_ggplot",
    "canon",
    "check_plot",
    "compare_conceptual",
    "compare_plots",
    "compare_visual",
    "enrich_spec",
    "equiv_aes",
    "equiv_coord",
    "equiv_data",
    "equiv_facets",
    "equiv_labels",
    "equiv_layers",
    "equiv_params",
    "equiv_plot",
    "equiv_rendered",
    "equiv_scales",
    "expect_equiv_plot",
    "has_layer",
    "is_ggplot",
    "mapping_exists",
    "n_layers",
    "spec_aes",
    "spec_coord",
    "spec_data",
    "spec_facets",
    "spec_labels",
    "spec_layers",
    "spec_plot",
    "spec_scales"
  ],
  "_help": [
    {
      "page": "assert_ggplot",
      "title": "Assert that an object is a ggplot",
      "topics": [
        "assert_ggplot"
      ]
    },
    {
      "page": "canon",
      "title": "Canonicalise a ggplot specification",
      "topics": [
        "canon"
      ]
    },
    {
      "page": "check_plot",
      "title": "Framework-agnostic plot check",
      "topics": [
        "check_plot"
      ]
    },
    {
      "page": "compare_conceptual",
      "title": "Compare two ggplot objects for conceptual similarity",
      "topics": [
        "compare_conceptual"
      ]
    },
    {
      "page": "compare_plots",
      "title": "Compare two ggplot objects",
      "topics": [
        "compare_plots"
      ]
    },
    {
      "page": "compare_visual",
      "title": "Compare two ggplot objects for visual equivalence",
      "topics": [
        "compare_visual"
      ]
    },
    {
      "page": "enrich_spec",
      "title": "Enrich a plot's layer specification with build-derived default information",
      "topics": [
        "enrich_spec"
      ]
    },
    {
      "page": "equiv_aes",
      "title": "Compare aesthetic mappings of two ggplot objects",
      "topics": [
        "equiv_aes"
      ]
    },
    {
      "page": "equiv_coord",
      "title": "Compare coordinate systems of two ggplot objects",
      "topics": [
        "equiv_coord"
      ]
    },
    {
      "page": "equiv_data",
      "title": "Compare the data of a layer in two ggplot objects",
      "topics": [
        "equiv_data"
      ]
    },
    {
      "page": "equiv_facets",
      "title": "Compare facet specification of two ggplot objects",
      "topics": [
        "equiv_facets"
      ]
    },
    {
      "page": "equiv_labels",
      "title": "Compare labels of two ggplot objects",
      "topics": [
        "equiv_labels"
      ]
    },
    {
      "page": "equiv_layers",
      "title": "Compare layer structure of two ggplot objects",
      "topics": [
        "equiv_layers"
      ]
    },
    {
      "page": "equiv_params",
      "title": "Compare parameters of a specific layer in two ggplot objects",
      "topics": [
        "equiv_params"
      ]
    },
    {
      "page": "equiv_plot",
      "title": "Compare two ggplot objects across multiple dimensions",
      "topics": [
        "equiv_plot"
      ]
    },
    {
      "page": "equiv_rendered",
      "title": "Compare the rendered (built) layer data of two ggplot objects",
      "topics": [
        "equiv_rendered"
      ]
    },
    {
      "page": "equiv_scales",
      "title": "Compare scales of two ggplot objects",
      "topics": [
        "equiv_scales"
      ]
    },
    {
      "page": "expect_equiv_plot",
      "title": "testthat expectation for plot equivalence",
      "topics": [
        "expect_equiv_plot"
      ]
    },
    {
      "page": "has_layer",
      "title": "Test whether a plot contains a given layer",
      "topics": [
        "has_layer"
      ]
    },
    {
      "page": "is_ggplot",
      "title": "Test whether an object is a ggplot",
      "topics": [
        "is_ggplot"
      ]
    },
    {
      "page": "mapping_exists",
      "title": "Test whether a specific aesthetic mapping exists in a plot",
      "topics": [
        "mapping_exists"
      ]
    },
    {
      "page": "n_layers",
      "title": "Count the number of layers in a ggplot",
      "topics": [
        "n_layers"
      ]
    },
    {
      "page": "spec_aes",
      "title": "Extract aesthetic mappings as a long-format tidy data frame",
      "topics": [
        "spec_aes"
      ]
    },
    {
      "page": "spec_coord",
      "title": "Extract coordinate system specification as a tidy data frame",
      "topics": [
        "spec_coord"
      ]
    },
    {
      "page": "spec_data",
      "title": "Extract the dataset table for a ggplot object",
      "topics": [
        "spec_data"
      ]
    },
    {
      "page": "spec_facets",
      "title": "Extract facet specification as a tidy data frame",
      "topics": [
        "spec_facets"
      ]
    },
    {
      "page": "spec_labels",
      "title": "Extract plot labels as a tidy data frame",
      "topics": [
        "spec_labels"
      ]
    },
    {
      "page": "spec_layers",
      "title": "Extract layer specifications as a tidy data frame",
      "topics": [
        "spec_layers"
      ]
    },
    {
      "page": "spec_plot",
      "title": "Extract the full plot specification as a master tidy data frame",
      "topics": [
        "spec_plot"
      ]
    },
    {
      "page": "spec_scales",
      "title": "Extract scale specifications as a tidy data frame",
      "topics": [
        "spec_scales"
      ]
    }
  ],
  "_readme": "https://github.com/clement-lee/ggspec/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "cpp11",
    "dplyr",
    "farver",
    "generics",
    "ggplot2",
    "glue",
    "gtable",
    "isoband",
    "labeling",
    "lifecycle",
    "magrittr",
    "pillar",
    "pkgconfig",
    "R6",
    "RColorBrewer",
    "rlang",
    "S7",
    "scales",
    "tibble",
    "tidyselect",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "equivalence-patterns.Rmd",
      "filename": "equivalence-patterns.html",
      "title": "Equivalence Patterns and Canonicalisation Modes",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "1. Inheritance transparency",
        "1.1 Global, local, and mixed aes()",
        "1.2 Global vs per-layer data",
        "1.3 Layer order",
        "2. Bar chart equivalence",
        "2.1 Direct equivalents",
        "2.2 geom_col() — structural mode required",
        "2.3 coord_flip() — visual mode required",
        "2.4 Scale name vs labs() — visual mode required",
        "3. Count plot equivalence",
        "3.1 geom_count() variants — direct equivalents",
        "3.2 geom_point(aes(size = n)) + pre-counted data — separate equivalence group",
        "3.5 Pre-counted bar charts — exhausting the equivalence cases",
        "4. Histogram binning variants",
        "5. Pending work",
        "5.1 Cross-geom stat equivalence",
        "5.2 Multi-dataset layer verification"
      ],
      "created": "2026-04-14 15:43:24",
      "modified": "2026-05-06 17:38:53",
      "commits": 4
    },
    {
      "source": "extracting-specs.Rmd",
      "filename": "extracting-specs.html",
      "title": "Extracting Plot Specifications with ggspec",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "A motivating example",
        "Layer specification",
        "Controlling inheritance",
        "Aesthetic specification (long format)",
        "Scale specification",
        "Facet specification",
        "Label specification",
        "Coordinate system specification",
        "The master summary: spec_plot()"
      ],
      "created": "2026-04-09 12:38:30",
      "modified": "2026-05-06 17:38:53",
      "commits": 2
    },
    {
      "source": "grading-with-ggspec.Rmd",
      "filename": "grading-with-ggspec.html",
      "title": "Plot Grading and Testing with ggspec",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Comparing two plots with equiv_plot()",
        "Running individual checks",
        "The exact argument",
        "Framework-agnostic checking with check_plot()",
        "Swapping in a learnr/gradethis fail function",
        "Using expect_equiv_plot() in testthat",
        "Inspecting the diff",
        "Comparing layer parameters",
        "Canonicalisation-aware comparison with compare_plots()",
        "Modes",
        "Using a mode in check_plot()",
        "What each mode covers",
        "Summary of available checks"
      ],
      "created": "2026-04-09 12:38:30",
      "modified": "2026-05-06 17:38:53",
      "commits": 5
    }
  ],
  "_score": 4.8750612633917,
  "_indexed": true,
  "_nocasepkg": "ggspec",
  "_universes": [
    "clement-lee"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-29T10:29:39.000Z",
      "distro": "noble",
      "commit": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
      "fileid": "d3a906ccbeca6d04eef0498e14b1570fb6a7b9c536db4de4282660bb177bf9f3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/clement-lee/actions/runs/26631965461"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-29T10:30:11.000Z",
      "distro": "noble",
      "commit": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
      "fileid": "64bbc0e37c100d30de27555189aa1d43954cead4dafc449a587136efa26ee562",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/clement-lee/actions/runs/26631965461"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-05-29T11:41:28.000Z",
      "commit": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
      "fileid": "cdd9b2bca462ed5f4294e4cc508cec4729f731144e5256c1d0f53e676a35b8d9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/clement-lee/actions/runs/26631965461"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-05-29T11:39:58.000Z",
      "commit": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
      "fileid": "23f0a93449e3fa50078c36aadf533a7df87b093b9fa36a24f5ccda512597b398",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/clement-lee/actions/runs/26631965461"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0",
      "date": "2026-05-29T10:29:34.000Z",
      "commit": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
      "fileid": "c34a0a086367bf63d57dd3c07e6424655644dfaa43a4705ba06fa6327e684679",
      "status": "success",
      "buildurl": "https://github.com/r-universe/clement-lee/actions/runs/26631965461"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-05-29T10:28:53.000Z",
      "commit": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
      "fileid": "89f81d172b5d67bf2c13f604c8e57c2f2c696336accafe5eb4e4292f27a5cbb2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/clement-lee/actions/runs/26631965461"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-05-29T10:28:59.000Z",
      "commit": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
      "fileid": "090f367da66e3ae69559b3dab9bfd7572f39d81c5b21b9ef74eaa039ffd0fcab",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/clement-lee/actions/runs/26631965461"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-05-29T10:28:53.000Z",
      "commit": "1f4e2bf7d3a57e7d45eda110533dbee38f08c126",
      "fileid": "016857f23edf13f3bc9af158e678c64f13cc7ddb473dd80316f0537b84fe5fc6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/clement-lee/actions/runs/26631965461"
    }
  ]
}