The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Richard Wen
rrwen.dev@gmail.com
User-friendly functions for creating consistent and reproducible graphics and diagrams with lines, common shapes, and text. Compatible with and based on the R ‘grid’ package.
install.packages("draw")
drawSettings
drawPage
drawBox
, drawCircle
,
drawLine
, drawText
drawExport
library(draw)
# Set drawing settings
drawSettings(pageWidth = 5, pageHeight = 5, units = "inches")
# Create a new drawing page
drawPage()
# Draw graphics on the page
drawBox(x = 2.5, y = 2.5, width = 1, height = 1)
drawCircle(x = 2.5, y = 2.5, radius = 0.5)
drawLine(x = c(1, 4),
y = c(1 ,1))
drawText(x = 2.5, y = 2.5, text = "TEXT")
# Export the drawing page to a PDF
drawExport("draw.pdf")
# Export the drawing page to a JPEG
drawExport("draw.jpeg", ppi = 300)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.