aboutsummaryrefslogtreecommitdiff
path: root/R/chent.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/chent.R')
-rw-r--r--R/chent.R15
1 files changed, 15 insertions, 0 deletions
diff --git a/R/chent.R b/R/chent.R
index ae23aeb..f3626de 100644
--- a/R/chent.R
+++ b/R/chent.R
@@ -403,6 +403,21 @@ chent <- R6Class("chent",
png(path, antialias = antialias)
plot(self)
dev.off()
+ },
+ emf = function(file = paste0(self$identifier, ".emf"), dir = "structures/emf") {
+ if (!requireNamespace("devEMF")) {
+ stop("You need to have the devEMF package installed for this function")
+ }
+ if (!dir.exists(dir)) {
+ message("Directory '", dir, "' does not exist")
+ message("Trying to create directory '", dir, "'")
+ dir.create(dir, recursive = TRUE)
+ }
+ path = file.path(dir, file)
+ message("Creating file '", path, "'")
+ devEMF::emf(path)
+ plot(self)
+ dev.off()
}
)
)

Contact - Imprint