{"id":13857870,"url":"https://github.com/IRkernel/repr","last_synced_at":"2025-07-13T22:31:20.113Z","repository":{"id":29607676,"uuid":"33147994","full_name":"IRkernel/repr","owner":"IRkernel","description":"String and byte representations for all kinds of R objects","archived":false,"fork":false,"pushed_at":"2024-08-06T08:03:45.000Z","size":309,"stargazers_count":55,"open_issues_count":48,"forks_count":35,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-26T05:07:30.792Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://irkernel.github.io/docs/repr/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IRkernel.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-30T21:02:30.000Z","updated_at":"2025-06-20T08:07:54.000Z","dependencies_parsed_at":"2023-02-19T02:00:39.964Z","dependency_job_id":"ae14d0ac-74a0-4d41-80d4-8f44e2f7d2b4","html_url":"https://github.com/IRkernel/repr","commit_stats":{"total_commits":281,"total_committers":20,"mean_commits":14.05,"dds":0.2241992882562278,"last_synced_commit":"f6efa7622e2a0063826bf1432430d627cdf9dfe6"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/IRkernel/repr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRkernel%2Frepr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRkernel%2Frepr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRkernel%2Frepr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRkernel%2Frepr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IRkernel","download_url":"https://codeload.github.com/IRkernel/repr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRkernel%2Frepr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265218209,"owners_count":23729496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T03:01:49.311Z","updated_at":"2025-07-13T22:31:19.764Z","avatar_url":"https://github.com/IRkernel.png","language":"R","readme":"repr\u0026emsp;[![b-CI]][CI] [![b-CRAN]][CRAN]\n====\n\n[b-CI]: https://github.com/IRkernel/repr/actions/workflows/r.yml/badge.svg \"Build status\"\n[CI]: https://github.com/IRkernel/repr/actions/workflows/r.yml\n[b-CRAN]: https://www.r-pkg.org/badges/version/repr \"Comprehensive R Archive Network\"\n[CRAN]: https://cran.r-project.org/package=repr\n\nString and byte representations for all kinds of R objects.\n\nThis package exists to reliably create readable text (and viewable image) representations of data without the side effects [`print()`][print] can cause, such as invoking a [pager][file_show] and plotting to a plot device. In other words, all repr functions and methods are pure.\n\nIt is intended to be the basis of several packages that need to create rich text and graphics from R objects, such as [Jupyter][]’s [IRkernel][], [knitr][], and others, such as a future more powerful replacement for `R CMD Rd2pdf`.\n\n[print]: https://stat.ethz.ch/R-manual/R-devel/library/base/html/print.html\n[file_show]: https://stat.ethz.ch/R-manual/R-devel/library/base/html/file.show.html\n[Jupyter]: https://jupyter.org/\n[IRkernel]: https://github.com/IRkernel/IRkernel\n[knitr]: https://yihui.org/knitr/\n\nExports\n-------\n\n`repr` is a function delegating to the individual `repr_*` functions.\n\n`repr_*`, e.g. `repr_text`, `repr_html`, and `repr_png` emit single-element character vectors or raw vectors. They have parameters also configurable via global `options`.\n\n`mime2repr` is a list mapping all known mimetypes to `repr_*` functions, e.g. `mime2repr[['application/pdf']]` is `repr_pdf`.\n\n`format2repr` does the same for simple format names. So `format2repr$markdown` is `repr_markdown`.\n\nImports\n-------\n\nPer default, `repr` will not use any packages not part of the R distribution.\n\nOnly if you want to use `repr_html.function` and `repr_latex.function`, and specify the parameter `highlight` or option `repr.function.highlight` to be `TRUE`, then be sure to have [highr][] installed.\n\n[highr]: https://github.com/yihui/highr\n\nFormats\n-------\n\nCurrently, the actually emitted formats are:\n\n* Plain text, for everything, using `capture.output(print(thing))`. This will fail if `print(thing)` plots it instead. Please report classes which do that and aren’t handled yet (such as `recordedplot`).\n\n* HTML, Markdown, and LaTeX, which are emitted for everything non-graphical\n\n* PNG, JPG, SVG, and PDF for everything graphical (ATM just `recordedplot`)\n\nWhy not Pander?\n---------------\n\n[Pander][] Is very configurable and does the same as this one, only just for Markdown. Why don’t we use it and use [Pandoc][] to convert to other formats like it?\n\nBecause it emits just [Markdown][], which is the least semantic format available. A roundtrip through Markdown will undoubtedly create sub-par HTML and LaTeX.\n\nAlso Pander supports only text. Plots and images are also important to represent.\n\nPander is however awesome for high-quality Markdown so this project might want to depend on it.\n\n[Pander]: http://rapporter.github.io/pander/\n[Pandoc]: https://pandoc.org/\n[Markdown]: https://commonmark.org/\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIRkernel%2Frepr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIRkernel%2Frepr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIRkernel%2Frepr/lists"}