element. The resulting image is an array of 3 dimensions: height * width * 4 (RGBA) and can be written to png, jpeg or webp format: # create an svg image library(svglite) … This week we released a major new version of the rsvg package on CRAN. Packages are the fundamental concept of code reusability in R programming. Note that as.vector(x) is not necessarily a null operation if is.vector(x) is true: any names will be removed from an atomic vector. The following commands are all part of R’s Utils package, which is one of the core and built-in packages that contains a collection of utility functions. They are logical, integer, double, complex, character and raw. CRAN - Package rvg. This simple interface allows us to create supported input images for grImport and grImport2.For grImport, this was a task previously left as an exercise to the user, but is now much more convenient with the grConvert package. Additional functions provide access to SVG features that are not available in standard R graphics, such as hyperlinks, animation, filters, masks, clipping paths, and gradient and pattern fills. The ggsave function of svglite package does this job easily and we can also define the height and width of the plot inside this function.