Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.1%) to scientific vocabulary
Last synced: 6 months ago
·
JSON representation
Repository
R package to build UML graphs using plantuml
Basic Info
- Host: GitHub
- Owner: rkrug
- License: gpl-3.0
- Language: R
- Default Branch: master
- Homepage: https://rkrug.github.io/plantuml/index.html
- Size: 45.1 MB
Statistics
- Stars: 78
- Watchers: 4
- Forks: 7
- Open Issues: 5
- Releases: 10
Created over 8 years ago
· Last pushed 9 months ago
Metadata Files
Readme
Changelog
License
Codemeta
README.Rmd
---
title: "PlantUML in R"
output:
github_document
editor_options:
chunk_output_type: inline
---
```{r setup, echo = FALSE, include = FALSE}
devtools::load_all(here::here())
```
-----
[](https://doi.org/10.5281/zenodo.1922215)
[](https://rkrug.r-universe.dev)
[](https://codecov.io/github/rkrug/plantuml?branch=master)
[](https://www.tidyverse.org/lifecycle/#maturing)
-----
# Overview
This package provides the functionality to create UML graphs using the [PlantUML](https://plantuml.com/) language.
# Installation
## Prerequisites
The actual work is done by the program [plantuml](https://plantuml.com/). Please see [the plantuml installation page](https://plantuml.com/faq-install) for prerequisites of running plantuml.
## Installation of plantuml
The package is not on CRAN, but it is in the [R-Universe](https://rkrug.r-universe.dev/ui#package:plantuml). The original installation instructions can be found there, but are here reproduced fdor simplicity:
```{r installation_plantuml, eval = FALSE}
# Enable repository from rkrug
options(repos = c(
rkrug = 'https://rkrug.r-universe.dev',
CRAN = 'https://cloud.r-project.org'))
# Download and install plantuml in R
install.packages('plantuml')
# Browse the plantuml manual pages
help(package = 'plantuml')
```
# Plotting Plantuml graphics
## Define plantuml code
First, we define a plantuml object based on some plantuml code
```{r definePlantuml}
library(plantuml)
x <- '
(*) --> "Initialization"
if "Some Test" then
-->[true] "Some Activity"
--> "Another activity"
-right-> (*)
else
->[false] "Something else"
-->[Ending process] (*)
endif
'
x <- plantuml(
x
)
```
## Plotting to a file
To save the graph in a file, we simply specify the `file` argument in the plot command:
```{r exampleFile, eval = FALSE}
plot(
x,
file = "./vignettes/test.svg"
)
```
And here is the file

The type of the file is automatically determined based on the extension. Plantuml retturns an svg file, wi=hich is than converted using Suported extensions in plantuml are:
- svg To generate images in SVG format
- png To generate images in PNG format
- pdf To generate images in PDF format
- ps To generate images in PS format
- txt To generate images with ASCII art
# Plotting R objects
In addition to plotting based on plantuml code some basic functionality to document R objects has been included.
This is not much more than a proof of concept but includes all standard R objects.
**If you think this is usefull, pelase let me know and leave sugestions in the issue tracker.**
One example is:
```{r exampleObject}
x <- list(
a = 1:10,
b = letters[1:4],
c = data.frame(
x = 1:10,
y = c(TRUE, FALSE)
)
)
plot(
as.plantuml(x)
)
```
Owner
- Name: Rainer M Krug
- Login: rkrug
- Kind: user
- Location: Zürich
- Company: University of Zürich
- Repositories: 20
- Profile: https://github.com/rkrug
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "plantuml",
"description": "Create UML graphs using the PlantUML language. These are either shown in a graphics device or saved as a file.",
"name": "plantuml: Create UML Graphs using PlantUML Syntax",
"codeRepository": "https://github.com/rkrug/plantuml",
"issueTracker": "https://github.com/rkrug/plantuml/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.6.9",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.2.3 (2023-03-15)",
"author": [
{
"@type": "Person",
"givenName": "Rainer M.",
"familyName": "Krug",
"email": "Rainer@krugs.de",
"@id": "https://orcid.org/0000-0002-7490-0066"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Rainer M.",
"familyName": "Krug",
"email": "Rainer@krugs.de",
"@id": "https://orcid.org/0000-0002-7490-0066"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "covr",
"name": "covr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=covr"
},
{
"@type": "SoftwareApplication",
"identifier": "vdiffr",
"name": "vdiffr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=vdiffr"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
},
{
"@type": "SoftwareApplication",
"identifier": "yaml",
"name": "yaml",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=yaml"
}
],
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": "> 4.0"
},
"2": {
"@type": "SoftwareApplication",
"identifier": "utils",
"name": "utils"
},
"3": {
"@type": "SoftwareApplication",
"identifier": "tools",
"name": "tools"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "rsvg",
"name": "rsvg",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rsvg"
},
"5": {
"@type": "SoftwareApplication",
"identifier": "grDevices",
"name": "grDevices"
},
"6": {
"@type": "SoftwareApplication",
"identifier": "graphics",
"name": "graphics"
},
"7": {
"@type": "SoftwareApplication",
"identifier": "jsonlite",
"name": "jsonlite",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=jsonlite"
},
"8": {
"@type": "SoftwareApplication",
"identifier": "png",
"name": "png",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=png"
},
"SystemRequirements": null
},
"fileSize": "307.391KB",
"releaseNotes": "https://github.com/rkrug/plantuml/blob/master/NEWS.md",
"readme": "https://github.com/rkrug/plantuml/blob/master/README.md",
"contIntegration": "https://codecov.io/github/rkrug/plantuml?branch=master",
"developmentStatus": "https://www.tidyverse.org/lifecycle/#maturing"
}
GitHub Events
Total
- Watch event: 3
- Issue comment event: 1
- Push event: 1
Last Year
- Watch event: 3
- Issue comment event: 1
- Push event: 1
Dependencies
DESCRIPTION
cran
- R > 3.6 depends
- backports * imports
- grImport >= 0.9 imports
- graphics * imports
- magrittr * imports
- png * imports
- utils * imports
- covr * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
- tools * suggests
.github/workflows/check-standard.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite