Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create UML diagrams directly from R code

Tags:

r

uml

Does anyone have an actual approach on how to create UML diagrams directly from R code?

This is pretty much the only resource that I found in that regard. Works, but not really "integrated" in the sense that the required info for the diagrams are automatically detected in the actual code in any sort.

Related to this question.

like image 765
Rappster Avatar asked Jul 13 '16 08:07

Rappster


1 Answers

What do you mean by "required info for the diagrams are automatically detected in the actual code"? PlantUML in its current state (Link) is actually quite nice to easily create simple UML charts in R logic.

Take this example:

library(plantuml)
x <- '
(*) --> "Initialization"

if "Some Test" then
  -->[true] "Some Activity"
  --> "Another activity"
  -right-> (*)
else
  ->[false] "Something else"
  -->[Ending process] (*)
endif
'
x <- plantuml( 
  x
)

plot( 
  x = x
# vector = TRUE
  )

will plot as

enter image description here

Maybe check it out?

like image 176
Roman Avatar answered Oct 21 '22 10:10

Roman